From 2dc075e6e843e6d95af73d4c081b02dc42427629 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Sat, 30 Jan 2010 18:44:45 +0000 Subject: [PATCH] Potential leak caused by previous commit. [SVN r59370] --- include/boost/exception/info.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/boost/exception/info.hpp b/include/boost/exception/info.hpp index 07207e2..8a9270b 100644 --- a/include/boost/exception/info.hpp +++ b/include/boost/exception/info.hpp @@ -131,6 +131,9 @@ boost mutable std::string diagnostic_info_str_; mutable int count_; + error_info_container_impl( error_info_container_impl const & ); + error_info_container_impl & operator=( error_info_container const & ); + void add_ref() const { @@ -144,12 +147,14 @@ boost delete this; } - refcount_ptr + refcount_ptr clone() const { - refcount_ptr c; - c.adopt(new exception_detail::error_info_container_impl(*this)); - return c; + refcount_ptr p; + error_info_container_impl * c=new error_info_container_impl; + p.adopt(c); + c->info_ = info_; + return p; } }; }