Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-10-04 17:02:05

Hi Boost,

    I am currently revising shifted_ptr<> and I am asking myself if it is
worth keeping three distinct cyclic reference solutions. Let's analyse the

1) shifted_ptr is optimized purely for garbage collection:

+ cyclic references on the heap will automatically be deleted;
+ simpler to integrate with the policy based design;
- impossible to accelerate destruction of known cyclic references
- the garbage collector will have to be quite fast if kept as the default

2) shifted_ptr keeps the collector_traits<> class in order to associate
classes with their specific cyclic solution:

+ now possible to define at compile-time which method the developer prefers
using for a given class;
+ the design is defined only once and is class oriented;
+ don't have to create yet other smart pointers to handle those different
garbage solutions;
- more difficult to integrate with new designs eventually;
- cannot cast a shifted_ptr of type ownership with a garbage collected one.

3) the new policy based design is able to solve everything.

- ...?

It would be a lot simpler to concentrate on garbage collection issues but in
this case I would like some BOOST_GC_DEACTIVATE macro and the ability to
explicitly destroy a cyclic entity on the heap.

Any thoughts?


Boost list run by bdawes at, gregod at, cpdaniel at, john at