Memory leak :/

BlitzMax Forums/BlitzMax Beginners Area/Memory leak :/

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The problem was with Release. Whats that for then :O

Release is for telling the garbage collector that you're done with an integer reference (as opposed to an object reference, which BlitzMAX keeps track of automagically), and thus informing BlitzMAX it is safe for the garbage collector to release an object, if its reference count = 0.

Never, ever use Release in conjunction with real objects (that is one that is declared like p:Particle), as it should only ever be used with ints. Release is only there for the handful of people reluctant to embrace OOP.