-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
Bug: Detached DOM node memory leak #18066
Labels
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Comments
jdolearydl
added
the
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
label
Feb 18, 2020
Yes, that resolved it. Will this be included in the next release? |
I don't know for sure but I guess so. |
match08
added a commit
to match08/ionic5-react
that referenced
this issue
Nov 26, 2020
… 6.3.5 react 16.8.6 Detached DOM node memory leak: facebook/react#18066
anyone seeing this in react 17 as well? |
@kelly-tock just found it today, these nodes number comes back after few rerenderes but still very tricky thing |
I eventually found it via heap snapshots, so my case was not react related. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given a table in react that displays data from an API which can be refreshed with completely new information, I observed a detached DOM node leak (notice the green numbers):
Note: The DOM Nodes seem to settle at 21,000 but there shouldn't be that many nodes anyway, as you can see it starts at 7,000 after the first table generation. In my real-world app, these detached nodes persist even through navigation (with react router).
React version: 16.12.0
Steps To Reproduce
Link to code example:
Codesandbox
The current behavior
The DOM Nodes continue to increase when the table is regenerated, and even after a GC, not enough of the detached nodes are cleaned up.
The expected behavior
I would expect all the detached nodes to be cleaned up after a GC as they are in this example.
The text was updated successfully, but these errors were encountered: