how to check memory leaks in a c++ code. Are there any free tool for checking memory leaks
Asked
Active
Viewed 1,994 times
2
-
For UNIX or UNIX-like systems (e.g. OSX, BSD, Linux), there's [Valgrind](http://valgrind.org/). – Some programmer dude Feb 19 '13 at 06:57
-
For Windows, read e.g. [this article](http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx). – Some programmer dude Feb 19 '13 at 06:58
-
Depending on the platform, this might be a duplicate of either http://stackoverflow.com/questions/5195220/tools-to-determine-memory-leak-in-a-c-c-code or http://stackoverflow.com/questions/4720890/check-memory-leaks-in-windows. – jogojapan Feb 19 '13 at 06:59
-
You'll find many existing questions on this topic already. – LihO Feb 19 '13 at 07:43
-
Best tool for memory leak detection I've ever used was [Deleaker](http://www.deleaker.com/). Too bad it's not completely free. – LihO Feb 19 '13 at 07:45
2 Answers
3
This is a good tool for Linux, can also be found on most distro's package-handler.
-
Actually, I need to check memory leak in an embedded system. IDE is HEW and we are using uCOSIII RTOS. Valigrind does nt support fr the above configurations. so can u pls suggest me a tool or a method to check memory leak – user2086002 Feb 19 '13 at 09:40
3
Yes there it. Check out valgrind
. It can do lots of useful things, including detecting memory leaks.

NPE
- 486,780
- 108
- 951
- 1,012
-
Actually, I need to check memory leak in an embedded system. IDE is HEW and we are using uCOSIII RTOS. Valigrind does nt support fr the above configurations. so can u pls suggest me a tool are a method to check memory leak – user2086002 Feb 19 '13 at 09:31