Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: D-Programming-Language/phobos
head fork: D-Programming-Language/phobos
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 07, 2012
Ellery Newcomer fix issue 7022
fix issue 7831

detach sets p=null, which makes it kind of hard for the destructor
to actually close the file or decrement the reference count.
Commits on May 20, 2012
@andralex andralex Merge pull request #527 from mylodon/fix-issues-7831-7022
fix issue 7022
Showing with 2 additions and 2 deletions.
  1. +2 −2 std/stdio.d
4 std/stdio.d
@@ -382,8 +382,8 @@ and throws if that fails.
void detach()
if (!p) return;
- // @@@BUG
- //if (p.refs == 1) close();
+ if (p.refs == 1) close();
+ else if(p.refs != 0) p.refs--;
p = null;

No commit comments for this range

Something went wrong with that request. Please try again.