@Override protected void onDetachedFromWindow(){
  super.onDetachedFromWindow();
  if (mDecoEventManager != null) {
    mDecoEventManager.resetEvents();
  }
}

@ Override protected void onDetachedFromWindow ( ) { super . onDetachedFromWindow ( ) ; if ( mDecoEventManager != null ) { mDecoEventManager . resetEvents ( ) ; } }
this is called when the view is detached from a window . at this point it no longer has a surface for drawing , so we need to remove all scheduled events from the event manager
