More radical ideas about gc and reference counting
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 1 14:21:01 PDT 2014
On Thu, 01 May 2014 16:03:06 -0400, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> On 5/1/14, 12:52 PM, "Nordlöw" wrote:
>>>> into a class. I'm inclined to say that we should outright prohibit
>>>> that,
>>>
>>> That can't happen.
>>
>> Why is that?
>
> (1) Too much breakage, (2) would disallow a ton of correct code, (3) no
> reasonable alternative to propose. We'd essentially hang our users out
> to dry. -- Andrei
class C
{
void finalizer();
private struct S {
C owner;
~this() {
owner.finalize();
}
}
private S s;
}
You aren't helping anything.
-Steve
More information about the Digitalmars-d
mailing list