Memory leaks and detection

By | April 12, 2006

I recently encountered one of the strangest problems. I’ve been working on some tooling for a game engine we’re building with a small group of programmers. As usuall you keep finding problems and bugs, but what I’d discovered this time really got me anoyed. The tool or the engine, not sure at this point, contains a lot of memory leaks. No problem you’d say right, people have enough memory. Yeah I guess that’s true but the tool is a level designer that is supposed to be able to run stable for long periods of time.

The only reason I found out is because MFC started spitting out dozens of warnings that the heap wasn’t empty after stopping the program. Of course being programmed by Microsoft it conveniently forgot to tell me where the leak came from. Just an abstract notion of ‘Memory leak detected at address xxxxxx‘. Big help, thanks guys!

I hate to build shit, so I started looking for some tools that could help me in locating the memory leaks. And us building a game engine and all tools for free didn’t have money to go for a commercial product. Looking for some open source or free tools to solve the problem. I found some but guess what they either detected no memory leaks what so ever or they found hundreds of errors. Got one better for you. I actually found a memory leak detection package that caused two huge memory leaks.

Guess I’m left with building one from scratch. I just wish there were some real good open source developers out there.

One thought on “Memory leaks and detection

  1. PabloMano

    I never used this memory leak detection tools so can not give you advise about these tools. But have you considered taking other measures to prevent having memory leaks such as reference counting?


Leave a Reply