[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-bugs
Subject:    [Boost-bugs] [Boost C++ Libraries] #4483: [serialization]
From:       "Boost C++ Libraries" <noreply () lists ! boost ! org>
Date:       2010-07-28 15:35:58
Message-ID: 042.2c6e2bec79aa9b178cfe382d413f486c () lists ! boost ! org
[Download RAW message or body]

#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.
_______________________________________________
Boost-bugs mailing list
Boost-bugs@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic