Closed Trey2k closed 1 year ago
I logged all object IDs passed to ObjectDB::add_instance
, and the ID listend in the Leaked instance was not there. So I am unsure how else it could be added to object_slots
.
The issue was occurred because LuaAPI which stores a LuaState was stored by Ref in LuaState. LuaState would not free until LuaAPI's destructor was called. Which was not allowed to happen since it was stored in a safe Ref. Fixed by changing to a pointer which I think should be safe enough here. Fixed in a5b895150000ff8f46522c2af651c3e08c02efe2 will merge with #65
Describe the bug Memory leak cause when ever a new instance and the LuaAPI is created. Get the following warning in stderr
Leaked instance: LuaAPI:id
To Reproduce call luaAPI.new() and store it in a variable
Expected behavior To not leak.
Enviromint (please complete the following information):
Additional context It has to do with
ObjectDB::remove_instance
not being called. Im not familiar enough with this part of godot yet to say why that is.