title: General guidelines to avoid memory leaks in C++
body: <p>What are some general tips to make sure I don't leak memory in C++ programs? How do I figure out who should free memory that has been dynamically allocated?</p>