bilibili / DanmakuFlameMaster

Android开源弹幕引擎·烈焰弹幕使 ~
http://app.bilibili.com/
Apache License 2.0
9.53k stars 2.1k forks source link

DrawHandler cause Choreographer.mDisplayEventReceiver leak #460

Open ZellHo opened 3 years ago

ZellHo commented 3 years ago

DrawHandler裡會用到Choreographer.getInstance(), 但由於Choreographer.getInstance()是ThreadLocal變數, 而DrawHandler是活在自己的handlerThread上, 所以DanmakuView在離開時必須讓DrawHandler去執行Choreographer.getInstance().release()//要在DrawHandler的handlerThread上執行, 才能避免Choreographer.mDisplayEventReceiver leak