From 3aac7a51d0e1d98e72fba3fc66f89bf8bb1dfa44 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 27 Apr 2010 01:14:03 +0000 Subject: [PATCH] workaround for double-destruction bugs in compilers: with this, boost::exception objects should survive the case when the destructor is called twice. [SVN r61602] --- include/boost/exception/exception.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index fd516dd..2ca2790 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -75,8 +75,8 @@ boost void release() { - if( px_ ) - px_->release(); + if( px_ && px_->release() ) + px_=0; } }; } @@ -150,7 +150,7 @@ boost virtual shared_ptr get( type_info_ const & ) const = 0; virtual void set( shared_ptr const &, type_info_ const & ) = 0; virtual void add_ref() const = 0; - virtual void release() const = 0; + virtual bool release() const = 0; virtual refcount_ptr clone() const = 0; protected: