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: [email protected]
Reporter: [email protected]
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.
--