digitalmars.D.bugs - [Issue 14810] New: std.mmfile should only return a shared!T object
- via Digitalmars-d-bugs (20/20) Jul 19 2015 https://issues.dlang.org/show_bug.cgi?id=14810
https://issues.dlang.org/show_bug.cgi?id=14810 Issue ID: 14810 Summary: std.mmfile should only return a shared!T object Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: rsw0x rsw0x.me std.mmfile currently returns a class-type object which has no deterministic destruction guarantees, it seems much more appropriate for a resource to be reference counted. AFAICT it's actually possible to "write" something to an mmfile then exit a program without anything being written due to it never being synced to disk because there's no guarantee that a destructor will run. --
Jul 19 2015