Skip to content
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

Make sure we don't leak when an opcode is followed by itself #12784

Merged
merged 1 commit into from
Nov 9, 2017

Conversation

hpvb
Copy link
Member

@hpvb hpvb commented Nov 9, 2017

When compiling with GCC it is now possible for an opcode followed by
itself to never leave the scope it is currently in. This leads to a
situation where the dtor of a scope local variable isn't called which in
turn can lead to a memory leak.

By moving the goto outside of the scope of each opcode we guarantee that
all dtors have been called before the next opcode gets dispatched.

this fixes #12401

@akien-mga akien-mga added this to the 3.0 milestone Nov 9, 2017
When compiling with GCC it is now possible for an opcode followed by
itself to never leave the scope it is currently in. This leads to a
situation where the dtor of a scope local variable isn't called which in
turn can lead to a memory leak.

By moving the goto outside of the scope of each opcode we guarantee that
all dtors have been called before the next opcode gets dispatched.

this fixes godotengine#12401
@akien-mga akien-mga merged commit 881defa into godotengine:master Nov 9, 2017
@hpvb hpvb deleted the fix-12401 branch February 27, 2018 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Material Override data not freed if set from script
2 participants