Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed memory leak in DefaultAnimationsBuilder #241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jferlisi
Copy link

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.

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
Copy link
Author

Fixes #240

@Sloy
Copy link

Sloy commented Aug 25, 2016

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! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants