[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File Handle leak? Was: Octave/Win32 new binary package (2.9.12)
From: |
Michael Goffioul |
Subject: |
Re: File Handle leak? Was: Octave/Win32 new binary package (2.9.12) |
Date: |
Mon, 4 Jun 2007 17:00:54 +0200 |
On 6/4/07, Olli Saarela <address@hidden> wrote:
Benjamin Lindner wrote:
> A simple command like 'upper("a");' entered at the prompt increases
> the file handle count by 2 for every command.
There was indeed a bug in octave code, where file handles were not closed
properly. See patch below.
Michael.
Index: sysdep.cc
===================================================================
RCS file: /cvs/octave/src/sysdep.cc,v
retrieving revision 1.128
diff -c -p -r1.128 sysdep.cc
*** sysdep.cc 31 May 2007 19:39:12 -0000 1.128
--- sysdep.cc 4 Jun 2007 14:59:45 -0000
*************** same_file_internal (const std::string& f
*** 269,274 ****
--- 269,277 ----
CloseHandle (hfile2);
return false;
}
+
+ CloseHandle (hfile1);
+ CloseHandle (hfile2);
return (hfi1.dwVolumeSerialNumber == hfi2.dwVolumeSerialNumber
&& hfi1.nFileIndexHigh == hfi2.nFileIndexHigh