Thomas J. Gritzan said:
Use a bike or walk everywhere, if you can,
if you can't, use your car. That way you save gas.
In C++:
Use automatic storage when possible,
only use new/delete when you have to.
And prefer references over pointers, same idea.
Isn't this a FAQ issue?
I would add, for extremely large objects (large arrays, etc..) you probably
want to use the free store instead of automatic storage. The reason being
for very large arrays and such the stack just isn't big enough.
int MyBigArray[1000000]
probably will crash when you try to run it complaining about out of stack
space since that's 8 megs.
int MyBigArray[];
MyBigArray = new int[1000000]
may work as long as it can grab 8 megs from the free store