Re: [Boost-bugs] [Boost C++ Libraries] #4044: reset_object_address with library-created objects

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4044: reset_object_address with library-created objects
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-26 17:09:27


#4044: reset_object_address with library-created objects
-------------------------------------------------+--------------------------
 Reporter: Richard Hazlewood | Owner: ramey
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: serialization
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: reset_object_address heap allocated |
-------------------------------------------------+--------------------------

Comment(by ramey):

 It's very hard to discern what you're actually trying to do here. But
 since, I've come this far I'll ask what you think of the following example
 - derived from yours.
 {{{
 int main(int, char *[])
 {
     std::string serText;
     {
         std::ostringstream str;
         boost::archive::text_oarchive oa(str);
         Ob *p = new Ob;
         Ob *p2 = p;
         oa & p & p2; // Serialize two instances; serialization lib will
 track second
         delete p;
         serText = str.str();
     }

     {
         std::istringstream str(serText);
         boost::archive::text_iarchive ia(str);
         Ob *p = 0;
         Ob *p2 = 0;
         ia & p & p2;
         delete p;
     }

     return 0;
 }
 }}}

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4044#comment:1>
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:02 UTC