[Core] Fix Variant::construct of Object
Variant type was not updated correctly causing leaks in ref-counted
This commit is contained in:
parent
e343dbbcc1
commit
8f3e2c96eb
5 changed files with 34 additions and 1 deletions
|
|
@ -0,0 +1,11 @@
|
|||
# https://github.com/godotengine/godot/issues/90086
|
||||
|
||||
class MyObj:
|
||||
var obj : WeakRef
|
||||
|
||||
func test():
|
||||
var obj_1 = MyObj.new()
|
||||
var obj_2 = MyObj.new()
|
||||
assert(obj_2.get_reference_count() == 1)
|
||||
obj_1.set(&"obj", obj_2)
|
||||
assert(obj_2.get_reference_count() == 1)
|
||||
|
|
@ -0,0 +1 @@
|
|||
GDTEST_OK
|
||||
Loading…
Add table
Add a link
Reference in a new issue