[Gambas-user] _free not called when object destroyed
Brian G
brian at westwoodsvcs.com
Wed Aug 2 18:32:56 CEST 2023
I have a question regarding when an object is destroyed and _free is called.
in my code when I do the following then the object free method is called
dim a as myobject = new myobject
a = new myobject ' when I do this then the old object _free method
is called
But if I
a = NULL ' The _free method is never called for the
object or for any object in an array of objects
Maybe I don't understand correctly how this works, but I would expect
the objects _free method to be called if there is no other reference.
More information about the User
mailing list