Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr to stack-allocated object
From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-12-04 19:46:45


On Thu, Dec 4, 2008 at 4:42 PM, Jason Cipriani
> Thanks for the tip. In this case, function needs to take a shared_ptr
> as it is used in other contexts with shared_ptr's, it's only sometimes
> used with objects from the stack.

Yes, so you're right, this seems to be a classical use case for a
null_deleter, just pass the shared_ptr by const &.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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