Object deletion
BlitzMax Forums/BlitzMax Beginners Area/Object deletion| 
 | ||
| I'm still getting used to the OO and GC concepts of Max, so I wanted to check something with you lot. If I have something like this: Type blob
    Method doStuff()
        '...
    EndMethod
EndType
Local thisBlob:blob = New blob
blob.doStuff()
blob = NullThis constitutes a manual Delete call in procedural Blitz, right? Since nothing else points to that instance of blob, it'll be deleted on the next GC pass?EDIT: Changed blob = 0 to blob = Null because herp de derp. Last edited 2012 | 
| 
 | ||
| Correct, unless the New method for blob adds thisblob to a global TList, a very common practice. Also; blob.doStuff() blob = Null should be; thisblob.doStuff() thisblob = Null | 
| 
 | ||
| Whoops, yeah missed that. I do actually know the difference, embarrassing to have that slip-up caught. XD |