|
Boost Users : |
Subject: Re: [Boost-users] [serialization - newbie] serializing/deserializing singleton class objects
From: Rune Lund Olesen (rune.olesen_at_[hidden])
Date: 2009-08-05 05:16:22
Not totally sure what you problem is.
Have you considered tracking ? (<boost/serialization/tracking.hpp>)
I had a problem where i serialized pointers to temporary objects, in which
case i had to hold the pointers until serialization finished so it could
track them correctly (the library uses memory addressed for object tracking)
Perhaps pasting more code will help.
Anyways i strongly recommend to read the section about object tracking in
the documentation whrether or not this was a different problem.
Regards
Rune
On Tue, Aug 4, 2009 at 3:37 PM, Soumen <soumen78_at_[hidden]> wrote:
>
> There're some vector of raw pointer to const objects in MyData. Removing
> the
> const-ness from those pointer resolved the compilation issue. However, it
> seems some smart pointer inside serialization library code is freeing those
> memory and that's causing a crash later on.
>
> Is it mandatory, know it's advisable, that I need to use smart pointer
> instead of raw pointer in that vector here?
>
> Regards,
> ~ Soumen
>
>
> --
> View this message in context:
> http://www.nabble.com/-serialization---newbie--serializing-deserializing-singleton-class-objects-tp24803268p24808825.html
> Sent from the Boost - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net