
9 Jun
2006
9 Jun
'06
6:17 p.m.
Tim Taylor wrote:
Hi,
I am having some troubles with serialization of shared_ptrs. The basic problem is that when I serialize a shared_ptr, then later deserialize into a new shared_ptr, the use_count of the new pointer is, incorrectly (as far as I can see), 2 rather than 1.
I am using boost 1.33.1 and gcc 4.0.1.
Try destroying the archive object and check the use count again. The archive probably keeps its own temporary copy of the shared_ptr.