Re: std.mmfile is broken

2015-05-05 Thread tcak via Digitalmars-d

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.


Re: std.mmfile is broken

2015-05-05 Thread Liam McSherry via Digitalmars-d

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


This would probably be better reported as a bug using the issue 
tracker: https://issues.dlang.org/


std.mmfile is broken

2015-05-05 Thread Freddy via Digitalmars-d
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