Boost logo

Boost Users :

From: Filip Peters (filippeters_at_[hidden])
Date: 2005-07-07 12:08:05


Hi list,

I'm using the boost::serialization lib to archive
classes in a VC7.1 program.
I have a class C, derived from B, derived from
(abstract) A

now, in serialisation of C, I did:
ar & boost::serialization::make_nvp( "baseobject",
boost::serialization::base_object<B>( t ) );

This seems to give a memory leak on closing the
application.

So I tried the following 2 lines:
ar & boost::serialization::make_nvp( "baseobject",
boost::serialization::base_object<A>( t ) );
ar & boost::serialization::make_nvp( "baseobject2",
boost::serialization::base_object<B>( t ) );

and this seemed to work....

What is the correct way of saving C (derived from B
which is derived from A)?
It seems a bit strange to me that i have to call
serialization of A in the ser. of C. Shouldn't B take
care of this?

thanks,
Filip Peters

                
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


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