If I have a parent type and create child types as fields of that parent type, then release the parent type, will release clean up the child types as well?
Does Release release child types
BlitzMax Forums/BlitzMax Programming/Does Release release child types All release does is decrement the object's reference count in the garbage collector. If the integer handle was the sole reference to the object, it will be collected.
If the object that is destroyed has explicit references to other objects (eg Field Target:Enemy), and those references are the only reference to each of the child objects, they will be collected by the garbage collector. If they're stored in integer handles (eg Field RandomImage:Int), you'll have to add a destructor to the object to call release on the handles.
If the object that is destroyed has explicit references to other objects (eg Field Target:Enemy), and those references are the only reference to each of the child objects, they will be collected by the garbage collector. If they're stored in integer handles (eg Field RandomImage:Int), you'll have to add a destructor to the object to call release on the handles.
ta :)
you could create a method
method delete()
' do the stuff you want
endmethod
to take care that it is really gone :)
method delete()
' do the stuff you want
endmethod
to take care that it is really gone :)
you'll have to add a destructor to the object to call release on the handles.