[Issue 14810] New: std.mmfile should only return a shared!T object
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 19 11:36:24 PDT 2015
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 at puremagic.com
Reporter: rsw0x at 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.
--
More information about the Digitalmars-d-bugs
mailing list