> : 2) I don't see the code to close your statement, connection, and
> : ResultSet.  Those typically go to a finally block.
> 
> I'm 85% sure that's the memory leak right there... in absence of a
> good memory profiler, have you tried commenting out all of the Lucene
> related code, to make sure that your basic DB Data retrieval code doesn't
> leak memory?
> 
> i'm guessing that without the Lucene code, it won't run out of RAM as fast
> (because their won't be a RAMDirectory index taking up space) but you
> should still see your free memory steadily decrease.

Thank you Hoos,

I left some of my code out to make it compact. There is a finally-block that
does rigth this.
But you are completely rigth. I commented out all Lucene related code and
the free memory decreases every indexing run. I close the connection, but
this does not free the memory. Do you have another hint for me what I can do
against the memory leak in the connector to the mySQL-database? I am using
mysql-connector-java-3.1.10-bin.jar.

Constructor: inits the members:
        Connection conn
  Statement stmt
  ResultSet rs
finally block:
        conn.close();
        conn = null;
  stmt.close();
  stmt = null;
  rs.close();
  rs = null;

Bye for now.

Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to