Crouton
Crouton copied to clipboard
Fixed memory leak in DefaultAnimationsBuilder
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.
Fixes #240
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! ❤️