-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Cleanup at end of transaction to prevent memory leaks #15808
Conversation
@GavinJoyce - Can you review also? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM: Reviewed, and spoke with @krisselden about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks good to me, thanks for tackling it! I do find this coding style slightly confusing though (totally a pre-existing issue, and not something new introduced in this PR).
It would go a very long way if we had a comment that explained the general idea of what is going on. Basically documenting the setup
, addKey
, checkKey
, and cleanup
functions and how they play into the general transaction system here...
leaks when objects that are rendered are retained. Fix #15803
811d3ee
to
316c7c6
Compare
@rwjblue I think I made the code clearer, it doesn't diff as well, but can you take a look to see if you understand it better now? |
This looks good to me (and I agree that the code is now easier to understand) |
Thank you @krisselden! This is very much easier for me to understand (and likely better factored too boot). |
I believe that this needs to make its way into a 2.16 release once we have vetted it on 2.17 betas... |
Cleanup at end of transaction to prevent memory leaks when objects that are rendered are retained.
Fix #15803