GC vs Resource management.

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat May 3 11:27:47 PDT 2014


On 5/3/14, 5:39 AM, monnoroch wrote:
>
>> Hey I have this global variable, if I assign a value to it and later
>> null it, it'll call its destructor if its not referenced anywhere else.
>> Which in turn would make me think ref counting would be a good idea.
>
> It seems, that ARC is the only way. There were idea to make all
> non-scoped (in my terminology) objects ARC-d, if they have dtors. That
> makes sense to me.

Interesting, we haven't explored that. The most problematic implication 
would be that classes with destructors will form a hierarchy separate 
from Object.

Andrei


More information about the Digitalmars-d mailing list