Newbie initial comments on D language - scope

Janice Caron caron800 at googlemail.com
Tue Jan 29 23:56:58 PST 2008


On 1/30/08, Edward Diener <eddielee_no_spam_here at tropicsoft.com> wrote:
> In a GC environment memory is just another resource. The user of objects
> does not worry about memory being released as appropriate. Why should he
> have to worry about other resources being released as appropriate ?

The GC only collects /memory/, not /resources/.

You make a class "scope" if it needs to clean up non-memory resources
(e.g. close a file, terminate a network connection, etc).



More information about the Digitalmars-d mailing list