How to write a proper class destructor?

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Fri Jan 26 04:25:26 PST 2007


Jonas Kivi wrote:
> And about the scope keyword on a class member suggestion: What about the 
> "auto" keyword. What's the difference between the auto and the scope 
> keywords?

"scope" is for automatic deletion. "auto" is for type inference.
"auto" used to also be for automatic deletion, but its dual purpose was 
annoying, especially when you wanted to have both of its meanings apply 
(which wasn't possible).
"auto" may still do automatic deletion when a type is also supplied, I'm 
not sure, but if so that's just for backwards compatibility. Don't use 
it for that in new code.


More information about the Digitalmars-d-learn mailing list