You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @cuixiaoyiyi. Those threads prevent the UI blocking while doing work.
The thread in onCreate reads and processes lyrics from an external LRC file. The thread in readyUpMediaPlayer loads and prepares the music file. These are done asynchronously as they could take time and won't block the main UI thread so I would prefer keeping the threads.
Can you please make a PR fixing the issue? Thanks.
An anonymous inner class will hold a reference to the this pointer of the outer class and will not be released until the thread ends.
It will hold the Activity and prevent its timely release.
com.cg.lrceditor.EditorActivity: onCreate(...)
com.cg.lrceditor.EditorActivity: readyUpMediaPlayer(...)
Is the anonymous inner class thread necessary?
com.cg.lrceditor.HomePage: void onResume()
If it is necessary, it can be changed to static class + weak reference to eliminate the reference to the activity, which may cause memory leaks.
The text was updated successfully, but these errors were encountered: