A benchmark, mostly GC

Jonathan M Davis jmdavisProg at gmx.com
Mon Dec 12 11:15:00 PST 2011


On Monday, December 12, 2011 17:59:54 Manu wrote:
> Totally off topic... I have a question.
> 
> If I pass a pointer to a C library... how does the GC know when it's safe
> to collect?

It assumes that it's safe to collect it. If you pass a pointer to a C library 
and it keeps it, then you need to make sure that your D code maintains a 
reference to that data so that the GC doesn't collect it.

- Jonathan M Davis


More information about the Digitalmars-d mailing list