(svn r27379) -Codechange: Do not throw in the destructors of ScriptTest/ExecMode.

This commit is contained in:
frosch
2015-08-10 20:04:31 +00:00
parent d818e1779c
commit e5d105900d
5 changed files with 20 additions and 3 deletions

View File

@@ -25,7 +25,12 @@ int32 SimpleCountedObject::Release()
int32 res = --m_ref_cnt;
assert(res >= 0);
if (res == 0) {
FinalRelease();
try {
FinalRelease(); // may throw, for example ScriptTest/ExecMode
} catch (...) {
delete this;
throw;
}
delete this;
}
return res;