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