Temporarily protect array from garbage collection

Lars T. Kyllingstad via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 24 13:42:11 PDT 2014


On Thursday, 24 April 2014 at 20:09:38 UTC, Justin Whear wrote:
> You can use GC.addRoot() from core.memory before passing the 
> pointer to
> the C function, then use GC.removeRoot in your myFree function.

Perfect, thanks!


More information about the Digitalmars-d-learn mailing list