On Saturday, 6 February 2016 at 17:22:03 UTC, Adam D. Ruppe wrote:
On Saturday, 6 February 2016 at 11:15:06 UTC, Ola Fosheim
Grøstad wrote:
Nothing prevents you from creating your own reference counting
mechanism.
A struct wrapper doesn't give the things you need to reliably
handle inheritance.
I don't think I suggested using a struct wrapper? :-) That just
cause issues with alignment or requires a more complex allocator.
You can either build the refcount into the root class or use an
extra indirection like C++'s shared_ptr.