Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-11-12 20:27:15


"Peter Dimov" <pdimov_at_[hidden]> writes:

> Larry Evans wrote:
>>
>> If you could "reflect" all the reference counted smart_ptrs, like
>> shared_ptr, for a class, T, into some class specific structure, say
>> gc_desc<T>, then you could use this for precise garbage collection,
>> AFAICT. Although it does expose the guts (after all, shared_ptr<X>,
>> might be private in T), this is what you'd need to detect cycles.
>
> sp_collector.cpp finds shared_ptr instances with a memory scan. That's
> not the problem. The problem is following other owning pointers.
>
> Or, in more general terms, the problem is that different reflection
> clients need different things to be reflected.

Sounds like what I've been saying in a different thread.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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