[Issue 7095] GC doesn't return or reuse unused memory [D2.056]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 11 10:12:28 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=7095



--- Comment #3 from David Simcha <dsimcha at yahoo.com> 2011-12-11 10:12:27 PST ---
(In reply to comment #2)
> I understand. Thanks for the reply!
> 
> (With risk of polluting the bug tracker here, but perhaps to clarify the
> workaround: Could GC.malloc/free be used as well? 

You could use GC.free().  It's somewhat dangerous, though, because you risk
corrupting the GC if you free something incorrectly.  

> Also, I assume if a large
> array of structs that in turn contain references to other heap objects, those
> would not get scanned had the array been C-alloced risking active objects to
> get collected?)

Use GC.addRange() to get around this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list