Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-05-16 12:48:04


On Mon, May 12, 2008 at 8:26 PM, Peter Dimov <pdimov_at_[hidden]> wrote:

> Kevin Martin:
> > My question is whether the boost library has anywhere in it a null
> > deleter object, or whether it is possible to define one in place with
> > boost::lambda or similar?
>
> boost::lambda::_1 should work as a null deleter, although you're right that
> we might wish to add boost::null_deleter. Can you please file a Trac ticket
> for this?
>

Just a small note. It can be pretty expensive to use a shared_ptr for stack
objects.
shared_ptr allocates a shared_counter on heap and shared_ptr uses by default
thread safe locking.
If you can pass stack objects as shared_ptr instanses, why can't you pass
them as references?

Thanks,
Ovanes



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net