Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 71881 invoked from network); 5 Sep 2005 15:36:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Sep 2005 15:36:35 -0000 Received: (qmail 18820 invoked by uid 500); 5 Sep 2005 15:36:34 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 18496 invoked by uid 500); 5 Sep 2005 15:36:33 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 18483 invoked by uid 99); 5 Sep 2005 15:36:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 08:36:33 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.36] (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2005 08:36:45 -0700 Received: from phys-epost-1 ([129.159.136.14]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j85FaTTW017900 for ; Mon, 5 Sep 2005 09:36:30 -0600 (MDT) Received: from conversion-daemon.epost-mail1.sweden.sun.com by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IMC00301NUAPG@epost-mail1.sweden.sun.com> (original mail from Dyre.Tjeldvoll@Sun.COM) for derby-user@db.apache.org; Mon, 05 Sep 2005 17:36:29 +0200 (MEST) Received: from atum10.norway.sun.com.sun.com (atum10.Norway.Sun.COM [129.159.112.210]) by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IMC001EUOOSDN@epost-mail1.sweden.sun.com> for derby-user@db.apache.org; Mon, 05 Sep 2005 17:36:29 +0200 (MEST) Date: Mon, 05 Sep 2005 17:36:28 +0200 From: Dyre.Tjeldvoll@Sun.COM Subject: Re: Momory leak in JDBC driver? In-reply-to: <20050905141603.83562.qmail@web52501.mail.yahoo.com> To: Derby Discussion Message-id: MIME-version: 1.0 Content-type: text/plain; charset=us-ascii User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) References: <20050905141603.83562.qmail@web52501.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Wei Jiang <_weijiang_@yahoo.com> writes: > java.sql javadoc says: > > Note: A Statement object is automatically closed when it is garbage collected. > When a Statement object is closed, its current ResultSet object, if one exists, > is also closed. > > I do not close ResultSet. But I do close Statement. Is it possible that > when derby's Statement closed, the ResultSet is not? Can't say, but what I do know is that when you RE-EXECUTE a statement you get a new ResultSet, but you don't automatically close the previous ResultSet. So if you create multiple ResultSets from the same statement before you close it, ResultSets will be leaked, at least temporarily. I have been told that this is incorrect according to the JDBC specification... > > I did forget to close one statement. Does it help to close that statement? If not; I would try to close the ResultSets to see if that helps... -- dt