Date: 2003-10-06 13:04:23
On 10/06/2003 11:27 AM, Philippe A. Bouchard wrote:
> Philippe A. Bouchard wrote:
> What I am going to do:
> - I am going to keep os_collector;
I'm unsure of the justification of os_collector. Are smart_ptrs of
this type very similar to scoped_ptr's?
> - The gc_collector I am going to use is the one I was thinking about this
> - mark heap "entities" with another reference count;
> - the sizeof(shifted_ptr<T, gc_collector>) is going to be sizeof(void *)
> * 2;
I've just uploaded
I was hoping you could provide a similar analysis of memory used for
this gc_collector. In particular, sizeof(shared_ptr<T>) is the same as
the above (as noted by Greg Colvin's post:
http://article.gmane.org/gmane.comp.lib.boost.devel/25877 ). This is
the size/smart_ptr, but I'm wondering how shifted_ptr compares
with shared_ptr w.r.t. each pointee. (see the compare_mem.zip
(anal.mem.share_ptr.html) under the Vertices item).
> So in fact: by using the default alternative the smart pointer is going to
> be resonably fast and destructors are going to be properly called even for
> cyclic references. This is perfect.
Give us a hint as to how cyclic reference are handled.