Go: A new system programing language
Sean Kelly
sean at invisibleduck.org
Tue Nov 17 21:54:17 PST 2009
Walter Bright Wrote:
>
> Mixing D's gc world with manually managed memory isn't hard, as long as
> the following rules are followed:
>
> 1. don't allocate in one language and expect to free in another
> 2. keep a 'root' to all gc allocated data in the D side of the fence
> (otherwise it may get collected)
This may actually work in D 2.0. core.thread has thread_attachThis() to make the D GC aware of an external thread, and gc_malloc() is an extern (C) function. I haven't tested this extensively however, so if you're keen to try it, please let me know if there are any problems.
More information about the Digitalmars-d
mailing list