Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 1999-12-11 10:49:48


From: Dave Abrahams <abrahams_at_[hidden]>
> From way back:
>
> > My implementation is based on a recycler handle class that holds the counts, a
> > pointer to an object, and a pointer to a function for recycling the object. I
> > would have preferred to use virtual functions, but I needed the handle class
> to
> > be a fixed size. Smart pointers hold a pointer to a handle and a pointer to
> the
> > object held. You do a mark-sweep collection by calling recycle().
>
> If the recycler handle holds a pointer to an object, why are you also
> putting the handle in the smart pointer?

Because it holds it as a T* cast to void*, and can't therefore
cast it back to U* when needed.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk