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

Fix context memory leak #10680

Merged
merged 2 commits into from Sep 12, 2017

Conversation

Projects
None yet
4 participants
@gaearon
Member

gaearon commented Sep 12, 2017

This ensures we always pop the root context. Fixes a memory leak when unmountComponentAtNode() leaves reference to the tree via the context stack.

Verified by putting a breakpoint in unmountComponentAtNode and checking the context stack (which is now nulled).

@gaearon gaearon added this to the 16.0 milestone Sep 12, 2017

@gaearon gaearon requested review from bvaughn, sebmarkbage and acdlite and removed request for bvaughn and acdlite Sep 12, 2017

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Sep 12, 2017

Member

Got confirmation this actually fixes the leak in Marketplace.

Member

gaearon commented Sep 12, 2017

Got confirmation this actually fixes the leak in Marketplace.

@sophiebits

Is there a task number?

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Sep 12, 2017

Member

If I understand correctly, 21712891.

Member

gaearon commented Sep 12, 2017

If I understand correctly, 21712891.

@gaearon gaearon merged commit 65b9ad9 into facebook:master Sep 12, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@gaearon gaearon deleted the gaearon:context-fix branch Sep 13, 2017

@bvaughn bvaughn referenced this pull request Sep 14, 2017

Closed

React 16 RC #10294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment