On 07/09/2017 10:51 PM, Josh Juran via Boost wrote:
On Jul 9, 2017, at 7:07 PM, Phil Bouchard via Boost
wrote: I am not sure where the whole Boost memory management crew went over the years but the underlying integration with Javascript is the way to go. But thanks Boost for your support over the years.
Mostly I stick to boost::intrusive_ptr or equivalent in my own C++ code. However, as I developed my own high-level programming language[1], I discovered that having recursive closures implies having reference cycles, and I can no longer say that I’ve never written a mark-and-sweep garbage collector in anger.
Recursive closures shouldn't be a problem with root_ptr. I'll give it a shot later this week to confirm.
It was essential to maintain the property of timely destruction, though, so it sounds like our respective subsystems have similar requirements.
root_ptr is instantaneous; it's not postponing the destruction of the objects. -Phil