-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Fix memory leaks #17035
Fix memory leaks #17035
Conversation
Thirdparty bugfix should contain comment
|
f265a31
to
78223c8
Compare
Done.. waiting for merge.. |
Did you forget to |
I dont understand you, I just use the commit and then rebase with squash.. and it was enough in most cases |
Well, what I mean is that you mention the patches in the readme:
But there are no *.patch files in your commit. |
@Hinsbart Ok, I change it to just "Important: Some files have Godot-made changes. |
@@ -1284,7 +1284,9 @@ long Segment::DoLoadCluster(long long& pos, long& len) { | |||
pos += cluster_size; | |||
|
|||
m_pos = pos; | |||
|
|||
// -- GODOT start -- | |||
delete pCluster; |
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.
Won't pCluster
leak on line 1297 too if we don't enter this if
?
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.
Nevermind, it's assigned to m_pUnknownSize
and should not be freed.
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.
Yeah, I saw it too and didnt decide to delete
Thanks! Would you mind contributing those fixes upstream too, so that we can drop our custom modification next time we sync with them?
|
Okay ) I take a look on it |
@akien-mga Seems like erincato merged my PR to b2Polygon - erincatto/box2d#486, |
Thanks for the notice. It looks like we already had quite a few changes compared to the upstream code (diff when trying to replace our files by upstream ones: https://paste.fedoraproject.org/paste/-5ujnPQIUTZFZI8IjhhB2A), so I guess it's good to keep as is. Some of our changes shown in the diff are cosmetic and could be pushed upstream, but others are specific to Godot (like removing the dependency on Box2D's glue and using some Godot constants like |
Closes #17033, #17032, #17031, thanks @fangang190
Im not sure about right way to fix for #17030, cuz im not an expert in android apk, and calling zipClose(unaligned_apk, NULL); before return may cause errors, so anybody with free time and knowledge could fix it instead