RFC: safe ref counting
Imperatorn
johan_forsberg_86 at hotmail.com
Thu Oct 29 07:02:13 UTC 2020
On Tuesday, 27 October 2020 at 23:55:04 UTC, Eduard Staniloiu
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.
>>
>> [...]
>
> I’m late to the party.
>
> I think you could use one of the allocation schemes proposed by
> Alexandru Jercaianu in his dconf talk [2]
>
> [2] - https://youtu.be/kaA3HPgowwY
That's an interesting talk actually. What's the current status?
More information about the Digitalmars-d
mailing list