On 8/5/21 3:35 AM, Jonathan Tanner wrote:
I was interested in this root_ptr so I had a look and I’ve got to say that it doesn’t appear particularly similar to Herb Sutter’s deferred_heap/deferred_ptr to me, the primary point of that, as given in the name, is that it defers destructor calls by storing them so that you can be sure that all the correct destructors will be called and root_ptr doesn’t do this. Also deferred_heap/deferred_ptr has its own allocator that means that you don’t have to pass around node_proxys. Finally when a deferred_heap is destructed, or cleanup performed, it nulls out deferred_ptrs first so that you don’t need to check for cycles explicitly in your destructor.
The only thing that seems to have been embraced from root_ptr is the idea of trying to deal with reference counting cycles.

Well both are "region-based memory managers" and forces destruction of nested objects somehow linked together.

And here's even more evidence from the original Boost mailing list I am working on this wayyy back before Herb Sutter:


Finally though, in the CppCon talk when this was presented it was made very clear that this was an experiment and that someone else could take this and run with it, if you take the innovations from deferred_ptr and integrate them into root_ptr I’m sure Herb would be delighted, this is the whole point of open source.

I'm not sure why the mentality of the community in software engineering prevents any capital gains (except for Gates and Ballmer), Clang at least allows using their own code for commercial purposes and the ISO committee in general looks like open to deal with patents if it allows general advancements.

But it's okay, so be it & thanks anyways


Phil Bouchard
Founder & CTO
C.: (819) 328-4743

Fornux Logo