e**c 发帖数: 95 | 1 seems it's hard to undertand... People say it will cause undefined behavior.
But I don't quite understand... any help? |
w****m 发帖数: 146 | 2 sometimes when exception is thrown in dtor, it will cause stack unwinding |
e**c 发帖数: 95 | 3 stack unwinding is not a bad thing, what do you mean?
【在 w****m 的大作中提到】 : sometimes when exception is thrown in dtor, it will cause stack unwinding
|
w****m 发帖数: 146 | 4 Sorry for thr confusion, I should clarify it: If during stack unwinding a
dtor throws an exception and it is not caught and handled, the terminate()
function will be called. So be prepared to catch any potential exception in
dtor |
w****m 发帖数: 146 | |