I always strive to write my programs so they are Rock Solid, please share what techniques and/or programs you use to hunt down those nasty memory leaks. Some common ones I run into
[Source]
int i, a[10];
for(i=0;i<15;i++)
a=i;
[/Source]
One technique I use to track them down or errors in general is I write a for loop to a high number say 100,000 then I keep calling that function. If it has a memory leak it will usually crash or I examine Task Manager-> Performance and watch the Free Memory shrink.
Another one, that I think causes a crash:
[Source]
BitBlt(hdc, -5, -5 , 100 , 100, hdcPic, 0, 0, SRCCOPY);
[/Source]
When using GDI, does blitting outside the screen resolution cause a memory leak?
Any other common ones you can think of? An example is always helpful... how do you find em?
Thanks for sharing...
Vanz