Re:[boost] A question on serialization library

Virendra Verma wrote:
If a class has a pointer to an object, how does class know that the pointer was created by library or the class itself before serialization?
It doesn't. Why would it need to? Robert Ramey

Library woundn't care but the user would. For example, how would user delete or modify the object (pointed by pointer in the class) once loaded since user has no way of knowing how the object was allocated? My understanding is that the library creates and owns the object (using some kind of class factory) when loading from input stream unless user keeps a common allocator and somehow binds it to library's serializer. "Robert Ramey" <ramey@rrsd.com> wrote in message news:20040603175453.9FEB3314E9@acme.west.net...
Virendra Verma wrote:
If a class has a pointer to an object, how does class know that the pointer was created by library or the class itself before serialization?
It doesn't. Why would it need to?
Robert Ramey
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Robert Ramey
-
Virendra Verma