|
Boost : |
Subject: Re: [boost] [PATCH Boost.smart_ptr] Add intrusive_ptr<>::release()
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2013-12-04 11:30:47
On 12/2/13, Avi Kivity <avi_at_[hidden]> wrote:
> This provides a way to escape from automatic reference counting, and taking
> manual control of the reference. Useful when interfacing to a C API that
> expects a pointer with an elevated reference count.
>
> + <p><b>Notes:</b> The returned pointer has an
> elevated reference count. This
I don't think "elevated reference count" is clear enough. How
elevated? Elevated more?
It should say that it does not decrement the reference count. Or
"resets the intrusive_ptr without decrementing the reference count".
I don't think either name (release/detach) is clear enough. I'd
prefer something like
detach_retaining_count()
which isn't quite right either, but I'd be happy with a name that was
long, *ugly*, and clear. - Ugly because it is a dangerous function.
Tony
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk