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.
Re: GC can collect object allocated in function, despite a pointer to the object living on?
Sean Kelly via Digitalmars-d-learn Sat, 16 Aug 2014 15:45:41 -0700
- GC can collect object allocated in func... 岩倉 澪
- Re: GC can collect object allocate... Sean Kelly via Digitalmars-d-learn
- Re: GC can collect object allocate... Chris Cain via Digitalmars-d-learn