auto_ptr bug
Marc A. Lepage
mlepage@molecularmining.com
Mon Apr 10 13:34:00 GMT 2000
branko.cibej@hermes.si wrote:
>
> Brad Garcia wrote:
> > So, getting to my real problem: how can I make a map full of Foo's, and
> > have them get destroyed when the map is destroyed, given that the Foo's
> > themselves cannot be copied?
>
> I think your best bet is to use a reference-counted pointer.
> There are several implementations floating around; see, for
> instance, http://www.boost.org/ .
Or look in Stroustrup3e under "handle" for a quick-and-dirty
implementation.
--
Marc A. Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/
More information about the Libstdc++
mailing list