Allocator-aware @safe reference counting is still not possible

Dukc ajieskola at gmail.com
Sun Sep 25 14:04:31 UTC 2022


On Sunday, 25 September 2022 at 13:12:11 UTC, Paul Backus wrote:
>
> To make this work, we need the compiler to *enforce* the rules 
> about what the deallocator can and cannot do.

Why? The deallocator is going to be `@system` anyway.

This means that it does not matter whether there is an 
allocator-enabled reference counter. In either case it's safety 
by convention inside the deallocators, but compiler enforced 
safety in client code assuming the deallocator is written 
correctly.


More information about the Digitalmars-d mailing list