views:

74

answers:

4

I have a C++ Application, when I observe Task Manger, it shows that applicaiton's memory usage increases gradually.

I manually check my source code, and I used Visual Leak Detector for Visual C++ to find memory leak, but I couldn't find any. Is it 100% that there is a memory leak, and I couldn't find it or is there any possibility that Task Manager misguide me?

+1  A: 

I use Process Explorer as replacement for Task Manager. It shows history graphs for CPU/mem usage

Im0rtality
+1 for process explorer, but you didn't actually answer OP's question
Yoni H
+2  A: 

It isn't. It has several options for memory statistics (use View + Columns) and the version matters but the default view shows the working set. How much of the virtual memory your program uses is actually in RAM. That's a statistical number that can change very quickly. Just minimize the main window of your app for example.

The VM size it can show isn't great either. That number includes free heap blocks. Getting actual memory in use is very tricky, read the small print in the SDK article for HeapWalk.

It is useless for leak detection, unless you leak gobs of it.

Hans Passant
A: 

Use this tutorial to find errors :
Debug Tutorial Part 5: Handle Leaks

Good luck

lsalamon
A: 

I use Extended Task manager http://www.warecase.com/products.asp

This is useful for debugging purpose especially to check if a thread exists or not and other such cases. It can provide lots of information if you have pdb for your process or application.

Probably you can use DevPartner for identifying memory leaks. It is very useful.

ckv