/** Disposes any resources or pointers held by this instance to prepare for garbage collection */ public void dispose() { mCallEventBroadcaster.dispose(); mCallEventBroadcaster = null; mChangedAttributeListener = null; mDecoderStateListener = null; mMetadataListener = null; mAliasList = null; }
public void dispose() { mCanProcessAudio = false; if (mProcessorTask != null && mThreadPoolManager != null) { mThreadPoolManager.cancel(mProcessorTask); } mThreadPoolManager = null; mProcessorTask = null; mBuffer.clear(); mAudioEventBroadcaster.dispose(); mAudioEventBroadcaster = null; mAudioMetadataListener = null; if (mOutput != null) { mOutput.close(); } mOutput = null; mGainControl = null; mMuteControl = null; }