Return a class instance as a pointer

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Mar 31 08:44:03 PDT 2012


On 3/31/12, "Timo Westkämper\" <timo.westkamper at gmail.com>"@puremagic.com
> Also in such a way that it is not claimed by GC.

Probably save the reference somewhere. I think by just returning a
void* to a C function the GC will think all references to the objects
are gone and will eventually try to collect it.

Perhaps you could keep a hash of objects:
__gshared[Object] _store;


More information about the Digitalmars-d mailing list