Fixing the memory leaks in Variant and RefCounted. #388
migueldeicaza
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We currently have two kinds of memory leaks
One are memory leaks caused by Variants. As of now, the leak is plugged, but I know of at least one case (Kev) that is crashing, but I do not have a test case yet to find out where I am misusing the Variant (this situation is not helped by the fact that Godot comes with no documentation on the subject, and there is no information on ownership rules anywhere).
If this causes a crash for you, please set this variable to true:
Patrick has also contributed a patch to get an unref function that will drop the reference count of a RefCounted object and release it. It is currently a method called
_exp_unref
, we are surfacing this so that we can get the semantics right with standard applications.Eventually the above will be a no-op, and we will just put this in the
deinit
forRefCounted
Beta Was this translation helpful? Give feedback.
All reactions