workaround for double-destruction bugs in compilers: with this, boost::exception objects should survive the case when the destructor is called twice.

[SVN r61602]
This commit is contained in:
Emil Dotchevski
2010-04-27 01:14:03 +00:00
parent f10defd7a2
commit c251404656
3 changed files with 17 additions and 7 deletions

View File

@ -28,11 +28,16 @@ test_type
++count_;
}
void
bool
release()
{
if( !--count_ )
if( --count_ )
return false;
else
{
delete this;
return true;
}
}
private: