From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-01-12 21:36:24


From: Beman Dawes <beman_at_[hidden]>
...
> >
> >So you are using the raw pointers as weak pointers in this design?
>
> Well, not really, if I understand your definition of weak_ptr. There
> is no signal when the object is collected.

I see that you have arranged for the cached_object destructor
to remove the object from the cache, so that is your signal.

You could do a more general, if less efficient, implementation
with weak_ptr. The advantage would be that the cached objects
need not know they are counted and cached. That may not matter
for your purposes.