I can give you a more specific idea if you have problems with memory allocation, such as memory leak, of not-enough-memory problems. The type of product you need is called "memory debugger".
You can find the one suitable for you from this list:
http://en.wikipedia.org/wiki/Memory_debugger#List_of_memory_debugging_tools[
^].
At least some of these products are open-source.
Another (but not alternative, it could be the additional) approach is the validating library which you can use during run-time. Such library intercepts/replaces C++ memory allocation operations and count the balance. It can pinpoint the object where the memory is not completely released. Unfortunately, I cannot point you a particular 3rd-party library which you can use with contemporary C++ compilers, but if you use Visual Studio, you can use its debugger along with CRT libraries to detect and pinpoint memory leaks. Please see:
http://msdn.microsoft.com/en-us/library/x98tx3cf%28v=vs.100%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/x98tx3cf.aspx[
^].
You can improve your memory handling experience and reduce amount of manual work if you use some more advanced techniques like
automatic pointers, which provide limited
garbage collection facility for pointers:
http://www.cplusplus.com/reference/std/memory/auto_ptr/[
^].
—SA