Home > Archive > MySQL ODBC Connector > February 2006 > Statement release









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Statement release
Filip Rachunek

2006-02-25, 9:43 am

Hello,
I would like to solve this problem.
I get a Connection instance from a connection pool, create some
statements and prepared statements, do some database operations, close
all statements and return the connection to the pool.
My question is, are the statements released (garbage collected) after
calling Statement.close() or is it necessary to set them to null? I
would like to avoid a possible memory leak because the connection is
not physically closed, only returned to the pool to be reused later.
The second question is - if a statement is not properly closed due to
an exception thrown before the .close() method is called, could it
cause a memory leak as well?
I use the latest Connector of the 3.1.x branch and MySQL 4.1.x.

Filip

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com