Allocator-aware @safe reference counting is still not possible

jmh530 john.michael.hall at gmail.com
Tue Jan 24 22:00:45 UTC 2023


On Tuesday, 24 January 2023 at 21:01:04 UTC, Nick Treleaven wrote:
> [snip]
>
> AFAIU isolated needs to guarantee no other references point to 
> the data, so that we can call `free` on it without dangling 
> references. That applies even if the data is immutable, so we 
> can put immutable data on the heap.

I would think that a hypothetical isolated would apply to mutable 
data or pointers to mutable data. If the data is const or 
immutable, then D's transitivity implies that all pointers to it 
are read only.


More information about the Digitalmars-d mailing list