|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61558 - trunk/libs/serialization/src
From: ramey_at_[hidden]
Date: 2010-04-25 12:04:53
Author: ramey
Date: 2010-04-25 12:04:52 EDT (Sun, 25 Apr 2010)
New Revision: 61558
URL: http://svn.boost.org/trac/boost/changeset/61558
Log:
Attempt to resolve assertion and memory leak for void_cast records
Text files modified:
trunk/libs/serialization/src/void_cast.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Modified: trunk/libs/serialization/src/void_cast.cpp
==============================================================================
--- trunk/libs/serialization/src/void_cast.cpp (original)
+++ trunk/libs/serialization/src/void_cast.cpp 2010-04-25 12:04:52 EDT (Sun, 25 Apr 2010)
@@ -284,11 +284,6 @@
void_cast_detail::set_type::iterator it;
for(it = s.begin(); it != s.end();){
const void_caster * vc = *it;
- if(vc == this){
- s.erase(it);
- it = s.begin();
- }
- else
if(vc->m_parent == this){
s.erase(it);
delete vc;
@@ -297,6 +292,11 @@
else
it++;
}
+
+ // delete this guy if he's in there
+ it = s.find(this);
+ if(it != s.end())
+ s.erase(it);
}
} // namespace void_cast_detail
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