On 16/07/16 02:04, Walter Bright wrote:
On 7/15/2016 1:58 PM, Shachar Shemesh wrote:
Do enlighten me how to use intrusive reference counting in D. I am quite
interested in the answer.

Andrei and I are working on it. As he's expressed elsewhere, the idea is
to maintain the reference count in memory that is outside the type
system. It's meant to work hand-in-glove with the storage allocator.


First of all, it sounds like you envision that everyone will solely be using the D supplied allocators, and no one will be writing their own. That's not my vision of how a system programming language is used. In fact, I have seen very few large scale projects where a custom allocator was not used.

Either way, prefixing data to a structure is not what "intrusive" means.

But even if this turns out to be an adequate replacement for all the cases in which I'd want to use intrusive reference counting in C++ (unlikely), that only works for my first example, not my second one.

Shachar

Reply via email to