Newbie initial comments on D language - scope

Edward Diener eddielee_no_spam_here at tropicsoft.com
Wed Jan 30 14:44:58 PST 2008


Janice Caron wrote:
> 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/.

Memory is a subset of resource. It is, in most programmer's mind, the 
most important subset, but it is still just another resource.
> 
> You make a class "scope" if it needs to clean up non-memory resources
> (e.g. close a file, terminate a network connection, etc).

Yes, I do understand that fully.



More information about the Digitalmars-d mailing list