$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [smart_ptr] Interest in the missing smart pointer (that can target the stack)
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-02-08 19:10:47
On 5/02/2016 22:17, Rob Stewart wrote:
> shared_ptr can be used to manage memory differently than you imagine,
> it seems. I use shared_ptrs to share ownership between a plugin and
> the application loading it while using custom deleters to ensure that
> releasing the last reference means code in the dynamic library
> releases the memory, if indeed any was allocated. The plugin
> mechanism release such references before unloading a dynamic library,
> so all's well.
That's fine, and a perfectly reasonable use of a custom deleter.
That's not what I was talking about, which was specifically limited to
abuse of a null_deleter.