GC can collect object allocated in function, despite a pointer to the object living on?

"岩倉 澪" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 16 15:52:03 PDT 2014


I see now, makes sense. :)

On Saturday, 16 August 2014 at 22:43:21 UTC, Chris Cain wrote:
> This is actually not garbage collection. &newState is making a
> pointer to a reference that is located on the stack (that is,
> when you return from that function
> you now have a pointer that may at any time become overwritten
> and made invalid.)


More information about the Digitalmars-d-learn mailing list