
1 Sep
2006
1 Sep
'06
6:46 p.m.
In boost-1.33.1 and before, and still in boost-cvs, the base polymorphic archive classes (polymorphic_iarchive, polymorphic_oarchive) have non-virtual (default) destructors. The typical usage pattern for these types is to construct a derived class and return the base pointer to clients, who only know that the archive is a polymorphic archive, and not the specific derived class. This results in the client not being able to correctly delete the archive, even though the destructor is accessible (and so, easily invoked). I think that the right solution here is for the base polymorphic archive classes to define a public virtual destructor.