Finding Memory Leaks

BlitzMax Forums/BlitzMax Programming/Finding Memory Leaks

BLaBZ(Posted 2013) [#1]
Is there a technique or way to find memory leaks in blitzmax?

I have 30k+ lines of code and i feel like I've been trying to find a needle in a hay stack.

Thanks!


GfK(Posted 2013) [#2]
Ever-expanding lists of objects are always a good place to start. So stick a DebugLog myList.Count() anytime you add something to a TList. If a TList is becoming exponentially huge, there's your problem.


Cruis.In(Posted 2013) [#3]
or look for unintentional instancing of objects.


JoshK(Posted 2013) [#4]
Run a loop that reproduces the leak with as small of code as possible. It's difficult find memory leaks in BMX because the garbage collection makes it less predictable.