Bug #9812 Memory leak in closing statement
| Submitted: | 11 Apr 2005 11:30 | Modified: | 11 Apr 2005 14:53 |
|---|---|---|---|
| Reporter: | Alessandro Valbonesi | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / J | Severity: | S2 (Serious) |
| Version: | 3.1 - 3.2 | OS: | MacOS (Mac OS X) |
| Assigned to: | CPU Architecture: | Any |
[11 Apr 2005 11:30]
Alessandro Valbonesi
[11 Apr 2005 14:53]
Mark Matthews
Connector/J 3.1.8 and newer implement finalizers to take care of this, however note that even though the JDBC spec does state that it is required for statements to clean up after themselves, effectively in many cases they _can't_ completely (because of the indeterminate way in which finalizers run, most JDBC drivers, including ours will not attempt to communicate with the server to release server-side resources, as it is usally a surefire deadlock situation), which is why in other JDBC-related documents from Sun, they state that client programs really, really should close any JDBC resources they create. There is a reason those methods are there, so use them! (In fact, even more such methods for resource control are being added for JDBC-4.0). 3.1.8 will be released before the users' conference next week. This code is in the current nightly snapshots available at http://downloads.mysql.com/snapshots.php
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.