Crouton icon indicating copy to clipboard operation
Crouton copied to clipboard

Fixed memory leak in DefaultAnimationsBuilder

Open jferlisi opened this issue 9 years ago • 2 comments

When the animations get run there is a Handler that gets set on the Animation (Animation.mListenerHandler). This Handler holds a reference to the Activity. So caching the animations in a static field causes the Activity to be leaked. The fix was to remove the static fields that were caching the animation. Now the animations are created new each time.

jferlisi avatar Sep 28 '15 15:09 jferlisi

Fixes #240

jferlisi avatar Sep 28 '15 15:09 jferlisi

Thank you @jferlisi for this. We're using your fix in the InfoJobs application. I had to fork your branch and made some changes to make it available via JitPack with compile 'com.github.Sloy:Crouton:465f251b5d'.

It removed our leak. So, thank you a lot! ❤️

Sloy avatar Aug 25 '16 07:08 Sloy