On Tuesday, 5 May 2015 at 19:53:51 UTC, Freddy wrote:
The garbage collector is not required to call class
destructors, but Mmfile is a class and could leak memory.
http://dlang.org/phobos/std_mmfile.html
As far as I know, when a process is terminated, its file handlers
are removed by operating system automatically. Since, in
destructor method, it only closes the file, even destructor is
not called by the GC, it won't be a problem. Also, how else do
you think the file will be closed other than destructor? Either
it should be done manually, or by destructor.