I\'ll start out by saying, use smart pointers and you\'ll never have to worry about this.
What are the problems with the following code?
<
I've got an even better best practice: Where possible, end the variable's scope!
{ Foo* pFoo = new Foo; // use pFoo delete pFoo; }