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

Add instructions to README for avoiding memory leaks #106

Merged
merged 2 commits into from
Feb 3, 2017

Conversation

elihart
Copy link
Contributor

@elihart elihart commented Feb 3, 2017

#97

@felipecsl @seanabraham @gpeal

Hopefully this is clear enough so people don't fall prey to these leaks.

@audkar
Copy link

audkar commented Feb 3, 2017

Nice text with reasoning and explanations!

README.md Outdated

The downside to this approach is that the view is immediately cleared, so if you are animating your screen out it will go blank before the animation finishes. A better option that avoids this is to have your LayoutManager recycle its children when the RecyclerView is detached from the window. LinearLayoutManager and GridLayoutManager will do this for you if you enable `setRecycleChildrenOnDetach(true)`.

To automatically apply this you may wish to create a base adapter in your project that extends EpoxyAdapter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you may want to backtick EpoxyAdapter, LinearLayoutManager and others

@elihart elihart merged commit c224a3b into master Feb 3, 2017
@elihart elihart deleted the eli/memory_leak_info branch February 3, 2017 23:05
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.

4 participants