Memory leaks and other funnies...
Hi. i was wondering if there are any good tools, that can detect if your program leaves any allocated memory on exit. Please don''t say NuMega BoundsChecker... I don''t have that kind of money...
I was also wondeting if there are any tools that can tell how much memory your program has allocated, in total.
-mr BiCEPS
I guess you could override the new and delete operators and do your own checking there. Have a variable that you increase when you allocate memory, and decrese when you deallocate. You could also add functionality that gets the calling address from stack, and saves it in a list so you can see which new is unmatched. Of course this can slow down your program a bit, but not too much, because memory allocation is already quite slow. Then make a checking function that you call on exit.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement