Memory leak, or something like that
I'm not sure if it's called that but I use a whole bunch of virtual memory stuff like = new blah then I delete it, but when I go from the main menu to the options menu then back to the main menu, I gain memory useage in the Windows Task Manager. Is there anyway I can figure out where it's coming from?
Is it that you think a program you've coded is leaking memory? If so, I would just code a memory manager (or find one on google) that keeps track of all memory allocations and deallocations.
Well the thing is I'm 95% sure that everything is being deleted. And I couldn't find a program on google that check those things.
That doesn't mean there's a memory leak. Task manager is a very sucky way to measure memory usage.
2DarkNebula: Use BoundsChecker and Intel VTune Perfomance Analyzer - two programs I've found extremely useful to detect memory leaks, perfomance bottlenecks and many other things.
Don't use taskmanager's mem usage as an indication of memory usage. It probably doesn't show what you think it does. Better to use perfmon and include the columns:
Handle Count,
Private Bytes,
Thread Count,
Virtual Bytes.
Or better yet use http://www.flipcode.org/cgi-bin/fcarticles.cgi?show=64444
Handle Count,
Private Bytes,
Thread Count,
Virtual Bytes.
Or better yet use http://www.flipcode.org/cgi-bin/fcarticles.cgi?show=64444
That link for the Flipcode Memory manager doesn't work. I was going to look into it because I'm reprogramming the one that I based on superpig's tutorial here. It has worked very well for me, takes some tweaking to get working across all platforms (at least, to compile under GCC3 and VC++ 8). Includes smart pointers and garbage collector; very nice tutorial.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement