Freeing of memory (garbage collection)

Dan W twinbee42 at skytopia.com
Mon Dec 8 19:25:07 PST 2008


A couple of questions:

1: Even though D has an automatic garbage collector, is one still
allowed to free the memory of a malloced array manually (using free
() ), to avoid pauses in the program?

2: One justification on the website for using automatic garbage
collection is how "allocated memory will only be freed if system RAM
is tight". But surely that's silly, since one may want *lots* of
memory free for a completely different application (merely memory
being 'tight' before freeing may not be good enough - one may want D
to free memory sooner).


More information about the Digitalmars-d-learn mailing list