Finding Memory Leaks
BlitzMax Forums/BlitzMax Programming/Finding Memory Leaks| 
 | ||
| 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! | 
| 
 | ||
| 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. | 
| 
 | ||
| or look for unintentional instancing of objects. | 
| 
 | ||
| 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. |