Skip to content

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Dec 12, 2019

This is a follow up to #17582.

Notably, this removes the usage of storing the lastNativeEvent in a binding in the EnterLeavePlugin module – which can leak memory. Instead, we utilize the EventSystemFlags system which was recently exposed to EventPlugins by @sebmarkbage's work on the event replay system.

We mark when the EventPlugin is handling the first ancestor on the flags directly, meaning we don't need to monkey patch the native events or use WeakSets/Sets to achieve the goal – removing the use case of lastNativeEvent.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 12, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7f490b1:

Sandbox Source
wizardly-merkle-lildg Configuration

@trueadm trueadm requested a review from gaearon December 12, 2019 13:41
@sizebot
Copy link

sizebot commented Dec 12, 2019

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 7f490b1

@sizebot
Copy link

sizebot commented Dec 12, 2019

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 7f490b1

@trueadm trueadm merged commit be603f5 into facebook:master Dec 13, 2019
@trueadm trueadm deleted the address-mem-leak branch December 13, 2019 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants