This is a theoretical question to better understand how exceptions work.
What do I need to check to make sure my class is safe? What actually happens when I throw an exception from a stack point?
For example, if I create an object on the stack, it should be destroyed when I go out of scope, but what happens when I drop this object? Is it safe to do this or do I need to create an object on the heap?
Thanks a lot!
source
share