Subject: [Boost-bugs] [Boost C++ Libraries] #4483: [serialization] test_non_default_ctor2.cpp leaks FloatValueHolder instance
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-07-28 15:35:58
#4483: [serialization] test_non_default_ctor2.cpp leaks FloatValueHolder instance
-------------------------------------+--------------------------------------
Reporter: anonymous | Owner: ramey
Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
Version: Boost Development Trunk | Severity: Cosmetic
Keywords: |
-------------------------------------+--------------------------------------
The testcase should serialize member `A::floatValue` (type
`FloatValueHolder*`) by value instead of through a pointer.
Serializing through a pointer causes the instance created by `A`'s c'tor
to be overwritten by a newly created instance, leaking the original.
Using
{{{
ar & BOOST_SERIALIZATION_NVP(*floatValue)
}}}
instead fixes the problem
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4483> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC