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
The following code produces a memory leak because the layout does not release references to the onClick event handler. To observe the leak, just run top -p <PID> where the PID is printed from os.getpid(). We can confirm that this leak results from event handlers because when we remove it, the leak goes away:
Originally posted by @mx781 in #509
The following code produces a memory leak because the layout does not release references to the
onClick
event handler. To observe the leak, just runtop -p <PID>
where thePID
is printed fromos.getpid()
. We can confirm that this leak results from event handlers because when we remove it, the leak goes away:Interestingly though, if we assign the event handler at the root of the component's structure, the leak goes away:
This shows that we're not cleaning up state resulting from elements not at the root of the component.
The leak appears to be pretty small though since I don't think we've every seen the docs crash as a result of running out of memory.
The text was updated successfully, but these errors were encountered: