Subject: Re: [boost] [Root Pointer] Seeking a Review Manager
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-04-05 23:09:29
On 04/04/2016 04:27 AM, Rob Stewart wrote:
> On April 3, 2016 8:53:34 PM EDT, Phil Bouchard <philippeb8_at_[hidden]> wrote:
>> On 04/03/2016 08:32 PM, Edward Diener wrote:
>>> I still am not getting what root_ptr<someType> is. Is it a
>>> replacement for shared_ptr ?
>> There is no performance loss in using root_ptr/node_ptr over shared_ptr
>> so therefore yes it is a replacement for shared_ptr/weak_ptr.
> That isn't quite an answer to his question. If I understand you correctly, the point of your library is to provide a means to manage groups of related memory allocations using a root_pointer. Each related memory allocation is, I presume, a node_pointer created from, or attached to, one root_pointer. Because node_ptrs are grouped and owned by a root_ptr, they are (can be?) destroyed, as a group, when the corresponding root_ptr is destroyed, regardless of cycles.
I adapted the text here:
And I added important notes and a pitfall to the tutorial:
There is not much to add to the 'basic' section of the tutorial because
if you wrongly use make_root and make_node then you will get compile errors.