~= call copy ctor?
David Nadlinger
see at klickverbot.at
Fri Jul 20 14:50:59 PDT 2012
On Friday, 20 July 2012 at 21:41:45 UTC, Namespace wrote:
> Why comes "DTOR class" _after_ "end main" and not before?
> If i write "scope TestC c = ...;" it is correct, but i read that
> "scope" will be deprecated. Can someone explain me that
> behaviour?
The destructor will be invoked when the GC collects the object,
not when the last reference to it goes »out of scope«.
David
More information about the Digitalmars-d-learn
mailing list