You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix leaked ObjectRCs on object Variant reassignment
Bonus: - Add some (un)likely magic - Use memdelete() instead of memfree() (not strictly needed, but more correct)
This commit is contained in:
@@ -1996,7 +1996,7 @@ Object::~Object() {
|
||||
ObjectRC *rc = _rc.load(std::memory_order_acquire);
|
||||
if (rc) {
|
||||
if (rc->invalidate()) {
|
||||
memfree(rc);
|
||||
memdelete(rc);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user