Are scope class useful ?
#ponce
nospam at nospam.com
Wed Jan 6 01:08:54 PST 2010
> Yes. One of the uses is when you are wrapping some sort of OS resource.
>
> I've got a scope class which I use for file access;
> stops you accidentally leaving the file open & locked.
>
> I also use scope classes for storing intermediate results in complex
> algorithms when I want deterministic collection. Use scope classes
> and it all gets cleaned up when the algorithm finishes.
>
OK, makes sense now.
Neat feature indeed.
More information about the Digitalmars-d-learn
mailing list