Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2978/src/org/htmlparser/lexer
Modified Files:
Page.java
Log Message:
Fix bug #1005409 Input file not free by parser.
Files larger than 16K on Windows can now be explicitly closed with Page.close(),
or will be closed when the page is finalized.
Index: Page.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/Page.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** Page.java 1 Aug 2004 02:16:04 -0000 1.42
--- Page.java 25 Aug 2004 03:36:01 -0000 1.43
***************
*** 302,305 ****
--- 302,323 ----
/**
+ * Close the page by destroying the source of characters.
+ */
+ public void close () throws IOException
+ {
+ getSource ().destroy ();
+ }
+
+ /**
+ * Clean up this page, releasing resources.
+ * Calls <code>close()</code>.
+ * @exception Throwable if <code>close()</code> throws an <code>IOException</code>.
+ */
+ protected void finalize () throws Throwable
+ {
+ close ();
+ }
+
+ /**
* Get the connection, if any.
* @return The connection object for this page, or null if this page
|