octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OctDev] File Handle leak? Was: Octave/Win32 new binary package (2.9


From: Doug Stewart
Subject: Re: [OctDev] File Handle leak? Was: Octave/Win32 new binary package (2.9.12)
Date: Mon, 04 Jun 2007 14:55:03 -0500
User-agent: Thunderbird 1.5.0.12 (Windows/20070509)

Are you going to post a new version with this fix, or should I download this on with the bug?

Doug

Michael Goffioul wrote:
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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Octave-dev mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/octave-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]