|
Boost : |
From: Pavel Vasiliev (pavel_at_[hidden])
Date: 2003-02-04 10:32:57
>>I would like to offer for discussion one more implementation of reference
> counting smart pointer.<
> [snip]
> Howgh!
> Andrei
:-) In general, I agree with you. 1024-th smart pointer is 1023-rd
wheel reinvented. But The Best Wheel is still to be found.
Nevertheless, thanks for reply, even for the such one.
--- refc_ptr<T> is not a science-intensive implementation like Loki::SmartPtr<>. It rather oriented to practical needs. The following syntax is employed: refc_ptr<U> spU = new shell_xx<U>(args); where shell_xx<T> is one of "reference counting shells for objects of type T". With some "shells" refc_ptr<T> is the same as boost::shared_ptr<T>/weak_ptr<T>, with others - is similar to boost::intrusive_ptr<T>, or to shifted_ptr<T>, etc. All with the only class refc_ptr<T>; all types of reference counting are almost transparent for a client. Pavel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk