Memory leaks are a nightmare. I know: I have some.
What is the most effective (least painful and time consuming) way to locate them?
I use Visual Studio 2010 and develop in C++ for Windows.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Smart Pointers is probably what you are looking for. At least when allocating objects.
For containers, use the STL where possible.
If you are looking for existing memory leaks, you can use DEBUG_NEW if you are in VS2010.