Manually freeing up memory
bearophile
bearophileHUGS at lycos.com
Wed Nov 7 06:17:12 PST 2012
Joseph Rushton Wakeling:
> Can anyone advise? I would rather not disable the GC entirely
> as there's lots of Phobos I want to be able to use -- but I'd
> really like it if I could indicate categorically to the GC,
> "these objects and arrays need to be deleted and the memory
> freed _now_".
One solution is to allocate the original array on the C heap.
Another solution is to allocate it normally from the GC heap and
then use GC.free().
Maybe a third option is to use a memory-mapped file for the first
array.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list