One of the requirements for my first C++ assignments was that we must make sure that any allocated space was deallocated. However I ran into a problem when trying to determine if and how one would deallocate a non pointer variable. I have seen that outside of scope these variables are deallocated but could one also have:
int var_name=new int(6);
...
delete &var_name;
both seem to run but I don't understand why or how deallocating the address could cause problems. Thanks.