GC can collect object allocated in function, despite a pointer to the object living on?
Sean Kelly via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 16 15:41:44 PDT 2014
Interface and object variables are reference types--you don't
need the '*' to make them so. By adding the extra layer of
indirection you're losing the only reference the GC can decipher
to the currentState instance.
More information about the Digitalmars-d-learn
mailing list