You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#16087, #15157 (and other issues) point out that React keeps an alternate tree that can retain DOM elements in fibers such as the stateNode property. This can make it hard to debug memory leaks in larger sites/applications since they are a false positive.
To make the investigation process easier, would it be possible to recommend/suggest a way to somehow clean up the retainers in alternate fiber so that there is less noise?
We have some tools that do this to more or less successfully by pasring the fiber tree and setting alternate.stateNode to null.
I understand that fibers are internal API and that anything retained in alternate tree should fix itself eventually if the userland code is not leaky. However when there are leaks in userland the alternate tree can make root causing real memory leaks quite hard, even for those who are aware that retention in alternate trees is expected and a normal behaviour of React.