|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59370 - trunk/boost/exception
From: emil_at_[hidden]
Date: 2010-01-30 13:44:46
Author: emildotchevski
Date: 2010-01-30 13:44:45 EST (Sat, 30 Jan 2010)
New Revision: 59370
URL: http://svn.boost.org/trac/boost/changeset/59370
Log:
Potential leak caused by previous commit.
Text files modified:
trunk/boost/exception/info.hpp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
Modified: trunk/boost/exception/info.hpp
==============================================================================
--- trunk/boost/exception/info.hpp (original)
+++ trunk/boost/exception/info.hpp 2010-01-30 13:44:45 EST (Sat, 30 Jan 2010)
@@ -131,6 +131,9 @@
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 @@
delete this;
}
- refcount_ptr<exception_detail::error_info_container>
+ refcount_ptr<error_info_container>
clone() const
{
- refcount_ptr<exception_detail::error_info_container> c;
- c.adopt(new exception_detail::error_info_container_impl(*this));
- return c;
+ refcount_ptr<error_info_container> p;
+ error_info_container_impl * c=new error_info_container_impl;
+ p.adopt(c);
+ c->info_ = info_;
+ return p;
}
};
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk