CameraKit / blurkit-android

The missing Android blurring library. Fast blur-behind layout that parallels iOS.
MIT License
3.72k stars 309 forks source link

Leak #17

Closed lx1992lx closed 5 years ago

lx1992lx commented 7 years ago

I found the BlurLayout may cause serious leaks.In Choreographer.FrameCallback inner class, hold a context of activity. My solution is add this code when destory the Activity or BlurLayout. public void destory(){ Choreographer.getInstance().removeFrameCallback(invalidationLoop); invalidationLoop=null; }

Nobler commented 6 years ago

@lx1992lx Yes, but invalidationLoop is private in BlurLayout, how could you access it?

emersoncloud commented 5 years ago

Closing this ticket. In the latest version v1.0.0 we do call removeFrameCallback(invlidationLoop) when the pauseBlur() is called.