Boost logo

Boost :

Subject: Re: [boost] [shared_ptr] delete shared_ptr
From: Christoph Heindl (christoph.heindl_at_[hidden])
Date: 2011-03-17 06:24:39


On Thu, Mar 17, 2011 at 10:56 AM, Joshua Juran <jjuran_at_[hidden]> wrote:
> Is there a reason to pass the shared_ptr by value instead of const
> reference?

I'm not sure. After reading several discussions on the web [1,2] I
concluded that I'll stick with by-value.

[1] http://stackoverflow.com/questions/327573/c-passing-references-to-boostshared-ptr
[2] http://stackoverflow.com/questions/3310737/shared-ptr-by-reference-or-by-value

At a certain point of time in the past this was included in
boost.shared_ptr documentation. I quickly skimmed over the docs but
couldn't find any reference.

Best regards,
Christoph


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