It seems that when I drop the object, it is first copied to another stack, which is far from the usual one. It's true?
The thrown test does not exist when the exception is caught. This original test has already been destroyed. Thus, it must be a copy, and the new object is managed separately from the arguments and local variables. In other words, not on the stack.
Where does he live? This is before implementation. Most likely, this is dynamic memory (for example, a bunch), which the implementation implements for you.
And why is there a 144-byte distance between two “exception stack frames”?
The standard does not say how an implementation should handle an exception when it is re-selected in a catch . Since throw local variable must necessarily make a copy, the easiest way to implement throw is to always make a copy.
David hammen
source share