Re: Re: Re:boost::serialization Remarks

Martin Ecker wrote:
Although, I am having problems with my VC71 MFC application reporting memory leaks of a 24byte block corresponding to each shared_ptr loaded from an oarchive.
I'm not sure, but the memory leaks you experience could possibly be related to the fact that basic_iarchive::delete_created_pointers is never called. Maybe you can add a call to this function yourself somewhere in your application (delete_created_pointers is a public member function of basic_iarchive) and see if the memory leaks disappear.
The intended purpose of delete_created_pointers is to delete object created in the course of de-serializing a stream which has thrown an exception. Nothing more. One place you might want to look shared_ptr serialization. Serialization of shared_ptr starts out by initializing the shared pointer to NULL and adds references as things proceed. This might be a problem in the case where the shared_ptr is already pointing to something. Robert Ramey
participants (1)
-
Robert Ramey