Apply singleton instance binding clean-up fix no matter how it is created#1908
Apply singleton instance binding clean-up fix no matter how it is created#1908dsnopek wants to merge 1 commit into
Conversation
|
Hi @dsnopek so the game does not crash, but the Godot Editor (beta2) still crashes on exit. I am updating my local windows builds to rc2 with debug symbols and will report back. With rc2 debug symbols enabled This includes the godot-cpp v10 patch from this PR |
|
@dsnopek where does this stand? |
|
I haven't had a chance to come back to it. I know I tested this when I made the PR, but other than the automated test this adds, I don't recall how I was doing that. But however I was testing it, it didn't crash for me like in your testing. Can you share an MRP that I can use? |
|
Hi @dsnopek you can find a simple MRP: In the Then load the sample project from If you remove the for loop in the NOTE: The MRP is using |
Fixes #1900
This fix is a little weird in that it only addresses the
Wrapped(GodotObject *)constructor, but I think that's actually correct, because we only want to do this when the instance binding creation was initiated on the engine side using a pre-existing instance. If someone creates a new instance of a singleton (which they really shouldn't do, but there's nothing preventing it) then it shouldn't register that as an engine singleton.