Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-10-06 17:16:58

Gregory Colvin wrote:


>> destructors will be called on time (not obvious)
> What does "on time" mean? The best time and order for object
> finalization
> is an open and contentious issue among memory management experts.

"On time" means that the destructors will be called instantly; i.e. when the
last pointer on the stack is refering to a "group".

>> & it is not requiring too much extra memory. It is a better
>> overall,
> Better than what?

Faster than the actual shared_ptr mixed with a mark / sweep algorithm.
Cheaper on memory.

>> I would like it to be benchmarked
> Me too.
> My suspicion is that your implementation of garbage collection can be
> given a shared_ptr interface with no loss of performance, which I
> would prefer over introducing a new type.

I agree, but I would like the new interface of shared_ptr to be able to
handle pure garbage collectors... it is true that sometimes pure garbage
collectors are faster than reference counts. That will cover every possible
smart pointer.


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