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.
