How to guard against memory leaks?

Posted by just_wes on Stack Overflow See other posts from Stack Overflow or by just_wes
Published on 2010-02-02T16:14:33Z Indexed on 2010/05/19 23:10 UTC
Read the original article Hit count: 148

I was recently interviewing for a C++ position, and I was asked how I guard against creating memory leaks. I know I didn't give a satisfactory answer to that question, so I'm throwing it to you guys. What are the best ways to guard against memory leaks?

Thanks!

© Stack Overflow or respective owner

Related posts about c++

Related posts about interview-questions