[Dlang-internal] DIP1000 discussion and testing

Walter Bright via Dlang-internal dlang-internal at puremagic.com
Wed Nov 23 04:23:56 PST 2016


On 11/23/2016 3:08 AM, Mathias Lang wrote:
> If I understand correctly, it's not @safe because it might free a reference
> which is still used elsewhere, making it dangling.

Yes.

> If we have the correct `scope` enforcement though, we can allow it *only at the
> scope which `new`ed it*, because we know it's not possible than any other place
> has a reference to it, as the reference would have to be `scope` as well.
>
> Does that make sense ?

Yes. I'll see if I can make that work tomorrow.


More information about the Dlang-internal mailing list