D classes inherane. How it works.

Robert Fraser fraserofthenight at gmail.com
Wed Apr 9 12:36:05 PDT 2008


BCS wrote:
> My comment was in light of "let the GC handle it". Your suggestion 
> amounts to manual memory management (s/memory/resource/). That is fine 
> but to make it work you need to keep track of lifetimes which isn't 
> letting the GC do it. Personally I'd think the way to handle this kind 
> of thing would be to try really hard to make order of destruction 
> irrelevant and let the GC call ~this().

Fair enough, but designing classes such that the order of destruction is 
irrelevant is no trivial task.



More information about the Digitalmars-d mailing list