On Thu, Sep 11, 2014 at 5:18 PM, David Blaikie <[email protected]> wrote:
>
> On Sep 10, 2014 10:27 PM, "Craig Topper" <[email protected]> wrote:
>>
>> You'll notice half the places in clang that called addPPCallbacks ended up
>> with a cast to std::unique_ptr in the call to addPPCallbacks for the same
>> reason.
>
> If that api takes ownership, I'd still vote for it to take by unique_ptr
> even if many callers will still want to refer to the object later. Otherwise
> its hard to tell who's responsible for cleanup.

I agree. But it ultimately feels a little weird to me that
addPPCallbacks takes ownership to begin with.

I'm almost tempted to suggest a shared_ptr here.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to