D-Programming-Language/phobos — pull request #530 by MikeWey (2012-04-08 15:06:55+00:00)
Title: File.detach should decrement the ref count - Issue 7022

Because detach invalidates a copy of the File struct it should also decrement the ref count.
The File destructor doesn't take care of this because by then p is already null.