mVideoManager.setCameraStateListener() and mFURenderer.setOnTrackStatusChangedListener() cause the problem.
Anonymous inner class will keep a reference to its outer class.
Basically we have two options to avoid memory leak:
removing listeners when exit.
Using weak references.
A better solution is to clear all listeners on the related SDK level in appropriate lifecycle.
mVideoManager.setCameraStateListener()
andmFURenderer.setOnTrackStatusChangedListener()
cause the problem. Anonymous inner class will keep a reference to its outer class. Basically we have two options to avoid memory leak:A better solution is to clear all listeners on the related SDK level in appropriate lifecycle.