Am Tue, 18 Jul 2017 18:10:58 +0000 schrieb Atila Neves <atila.ne...@gmail.com>: > Now I've read your post properly: there is only one destructor. > With the fix I mentioned, just don't defined the `shared` > version, there's no need to. Postblit is still a problem, however. > > Atila
The issue is wider than just `shared` by the way: https://issues.dlang.org/show_bug.cgi?id=13628 Some may jump to say that an immutable struct can't be destructed, but my perspective here is that immutable only applies to what the compiler can introspect. A file descriptor or an opaque struct pointer from a C API are just flat values and escape the compiler. They can be stored in an immutable struct and still need `close()` called on them. Layman's head-const :p -- Marco