RFC: safe ref counting

aliak something at something.com
Sat May 2 19:01:49 UTC 2020


On Saturday, 2 May 2020 at 11:14:23 UTC, Seb wrote:
> On Saturday, 2 May 2020 at 02:27:10 UTC, Steven Schveighoffer 
> wrote:
>> In trying to make iopipe @safe, I came to the realization that 
>> having auto-managed items such as files and the like (std.io 
>> Files and Sockets are non-copyable), you need to rely on some 
>> form of @safe reference counting. Unfortunately 
>> std.typecons.RefCounted is not and cannot be safe. This is 
>> because it allocates in the C heap, and deallocates regardless 
>> of whether anyone has ever squirreled away a reference.
>>
>> [...]
>
> Are you aware of the stalled work to get reference counting in 
> druntime?
>
> https://github.com/dlang/druntime/pull/2679
>
> https://github.com/dlang/druntime/pull/2646
>
> https://github.com/dlang/druntime/pull/2760

Do you know what happened to the whole __mutable ?


More information about the Digitalmars-d mailing list