mirror of
https://github.com/boostorg/exception.git
synced 2025-07-22 08:42:06 +02:00
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:
@ -28,11 +28,16 @@ test_type
|
||||
++count_;
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
release()
|
||||
{
|
||||
if( !--count_ )
|
||||
if( --count_ )
|
||||
return false;
|
||||
else
|
||||
{
|
||||
delete this;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user