GC object finalization not guaranteed

Jason House jason.james.house at gmail.com
Sat Apr 18 17:07:15 PDT 2009


Walter Bright Wrote:

> Leandro Lucarella wrote:
> > Close a connection gracefully for example, I guess (I mean, send a "bye"
> > packed, not just close the socket abruptly). Same for closing files
> > writing some mark or something. They can be risky when finalization is not
> > deterministic though.
> 
> Scoped objects should be used for that, not gc.

What about member variables of scope objects? IIRC classes can't have scope member variables which can be frustrating when creating wrappers.

Can scope global variables exist? 



More information about the Digitalmars-d mailing list