Ignoring programming style and design, is it \"safe\" to call delete on a variable allocated on the stack?
For example:
int nAmount; delete &am
It's UB because you must not call delete on an item that has not been dynamically allocated with new. It's that simple.