@Override protected void onDestroy() { super.onDestroy(); // avoid memory leaks when the device is tilted and the menu gets recreated. SoftwareUpdater.instance().removeConfigurationUpdateListener(this); if (playerItem != null) { playerItem.unbindDrawables(); } }
@Override protected void onDestroy() { super.onDestroy(); if (playerSubscription != null) { playerSubscription.unsubscribe(); } // avoid memory leaks when the device is tilted and the menu gets recreated. SoftwareUpdater.instance().removeConfigurationUpdateListener(this); if (playerItem != null) { playerItem.unbindDrawables(); } if (mToken != null) { MusicUtils.unbindFromService(mToken); mToken = null; } }