I have been programming alot in the last few days with Asphyre, rewriting an old formerly vaporware project of mine. In some oo coding I have one pressing question: Can an object free itself?
Psuedocode Example:So for instance within the Update call the object could free itself if need be, or would I need to make a function to run through and clean out all the dead objects? Just wondering so I don't, you know, completely mess everything up.Code:if lifespan <= 0 then begin List.Remove(Self); Self.Free; end;
Bookmarks