Hi, if I have for example the following code:
type TObject
field image:Timage[10]
field x,y
...etc
endtype
global newObject:TObject
newObject = new TObject
Now say I wanted to delete newObject and release the memory of the object, I have been doing the following:
newObject = Null
...and I have been assuming that any fields within the type would release their memory as well.
But I have noticed that some code examplesI have encountered would first set all the images[] to null and then set newObject to Null.
Is its best to null the elements of a type and then the type or doesnt it matter?
Thanks
type TObject
field image:Timage[10]
field x,y
...etc
endtype
global newObject:TObject
newObject = new TObject
Now say I wanted to delete newObject and release the memory of the object, I have been doing the following:
newObject = Null
...and I have been assuming that any fields within the type would release their memory as well.
But I have noticed that some code examplesI have encountered would first set all the images[] to null and then set newObject to Null.
Is its best to null the elements of a type and then the type or doesnt it matter?
Thanks