Boost logo

Boost :

From: Kim Barrett (kab_at_[hidden])
Date: 2006-09-01 22:45:35

At 5:48 PM -0700 9/1/06, Robert Ramey wrote:
>I doubt its a problem in practice as the derived archive is usually
>constructed on the stack and thus gets
>destroyed automatically when it goes out of scope.

I got bit by this because I've got several "factory" functions that make
the various kinds of polymorphic archives that I'm using, all returning
a pointer to the appropriately directioned base polymorphic archive.
That way, only that one translation unit ever sees any of the more
specific archive headers, and it is included in a shared library that
lots of different programs use.

The workaround was to change my factory functions to return a shared_ptr
to the new archive (with the shared_ptr's deleter knowing the precise
archive type), which was probably an improvement anyway.

>Never the less, it looks to me like you're correct so I'll make the
>change in the CVS Head


Boost list run by bdawes at, gregod at, cpdaniel at, john at