A question about moving GC

Walter Bright newshound at digitalmars.com
Wed Jun 7 02:30:38 PDT 2006


Max Samuha wrote:
> Thank you for the extensive explanation!
> Marking my code with '// !!! Passing a pointer to C.' is what i've
> been doing recently:) and it seems the best solution for now until
> ares is mature or phobos has pin/unpin, or pointers passed to C are
> pinned implicitly.

They will be pinned implicitly, no need to call pin/unpin. The only time 
you're going to have a problem is if the C routine hides the pointer in 
a malloc'd buffer where the gc won't see it. The gc *will* see pointers 
on the C stack.



More information about the Digitalmars-d-learn mailing list