RFC: safe ref counting
Seb
seb at wilzba.ch
Sat May 2 11:14:23 UTC 2020
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
More information about the Digitalmars-d
mailing list