C ++ memory problems that may come up roughly there are so few ways:
Buffer overflow (buffer overrun).
Use vector
/ String buffer to manage automatically the length of a buffer in mind, and modify the buffer member functions, rather than a raw pointer. Dangling pointers, wild pointers.
用shared_ptr/weak_ptr
Repeat release (delete twice).
With scoped_ptr, released only once when the object destruction.
Memory leaks (memory leak).
With scoped_ptr, the object is automatically released when the destructor.
Unpaired new delete.
Try to avoid their own new, using the vector.
Memory chips (memory fragmentation).