Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2006-01-26 07:38:27


On 01/24/2006 09:45 AM, David Maisonave wrote:
> Since the current smart_ptr (policy_ptr) class at boost vault is on
> hold, I like to propose adding the following smart_ptr class to the
> boost library:
>
> http://code.axter.com/smart_ptr.h

Could you eliminate the tabs and reformat to something like
75 or 80 columns to ease reading. An example is
in http://boost-consulting.com/vault/Memory. Also, boost
convention is .hpp (or hxx or something like that) extension
instead of .h.

>
>
> IMHO, the above class has more functional features, than the class in

I notice policy_ptr has a weak_ptr class. Does axter smart_ptr
has something similar to handle cycles in pointer graph?

> the boost vault, and the class is ready for use.

I've compiled and run the policy_ptr tests with g++.

[snip]

> In my performance test, the shared and COW policies along with
> reference-link policy, are able to out perform the boost::shared_ptr.

Could this be due to shared_ptr having two refcounts and smart_ptr
having just one?

[snip]

Of course you mean weak_ptr? Does this support mean cycles can occur
if they're broken by the smart_ptr's version (if any) of
boost::weak_ptr?


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