Garbage collector question

Jonathan M Davis jmdavisProg at gmx.com
Wed May 15 23:45:34 PDT 2013


On Thursday, May 16, 2013 08:08:28 gedaiu wrote:
> Does the garbage collector manages the memory from extern(C)
> functions, or we have to delete manualy the objects created in
> those kind of functions?

The GC managase memory allocated with new or with core.memory. That's it. 
Anything allocated with normal malloc or anything else must be managed 
according to how that memory allocator works (which in the case of malloc, 
would mean calling free to deallocate the memory).

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list