Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-10-02 12:01:21

I've made a different version of placed_ptr<> which uses compile time
information (traits) to determine what method of destruction to use for
their allocated object: reference counts, garbage collection or simple

- no more run-time if ();
- garbage collection is the default one because it accepts a larger margin
of error. RC and OS should be considered optimization;
- RC is the default one for typename up to now, but I would suggest some
GC2... a different GC that would postpone their deallocations with no
cyclic_ptr overhead;
- OS should be used for container node allocations primarily for example;
- simple_tree is the default one;
- (po) is faster to type than (rc), (gc) or (os) ;)
- (I'm persuated consecutive deallocations can be optimized);
- (cyclic_ptr not implemented yet it this example):

Does someone knows a method to determine whether some class has a virtual
table at compile time? (I'm thinking of address ranges reported by the
first void * but it would not be easy to port).

BTW: placed_ptr<T, U, os_collector> not owning its target is a weak pointer.

Philippe A. Bouchard

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