I don't want to (and can't) use any _Crt... related memory leak detectors. _Crt... related functions only deal with malloc and free (as the microsoft site points out). I am using new and delete.
Main Topics
Browse All TopicsIn order to see if my app leaks memory I am calling _CrtDumpMemoryLeaks() when exiting. I then get a list of all memory leaks. However most of the entries in the list point to my CStrings as the guilty ones. But CStrings are supposed to manage their memory themselves. Isn't that right?
Is there a better way to detect memory leaks besides using _CrtDumpMemoryLeaks() or besides overloading the 'new' and 'delete' operators????
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
CStrings manage their own *internal* memory but you still have to deallocate the ones that you allocated.
See also:
http://msdn.microsoft.com/
Hi mnezuk
Please take a moment to read:
http://www.experts-exchang
We value our experts who are investing their time and effort to solve Q's for others. That's why I kindly ask you to read the grading text and add a comment or the grade given fits the description or that I have to make a change.
When no comment has been added within 72 hrs I'll change the grade to an "A"
Thanks !
modulo
Community Support Moderator
Experts Exchange
Business Accounts
Answer for Membership
by: satrangiPosted on 2002-12-05 at 12:42:29ID: 7538767
Depends on your IDE, MS Visual C++ which comes with Visual Studio has a debug mode you can use to detect memory leaks.
library/en -us/dnvc60 /html/ meml eaks.asp
Here is a guide from microsoft "Detecting and Isolating Memory Leaks Using Microsoft Visual C++"
http://msdn.microsoft.com/