Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 29864 invoked from network); 31 May 2006 13:51:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 May 2006 13:51:48 -0000 Received: (qmail 42522 invoked by uid 500); 31 May 2006 13:51:43 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 42246 invoked by uid 500); 31 May 2006 13:51:42 -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 42216 invoked by uid 99); 31 May 2006 13:51:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 06:51:42 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.27.42.35] (HELO smtp5-g19.free.fr) (212.27.42.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 May 2006 06:51:40 -0700 Received: from lns-bzn-59-82-252-187-29.adsl.proxad.net (lns-bzn-59-82-252-187-29.adsl.proxad.net [82.252.187.29]) by smtp5-g19.free.fr (Postfix) with ESMTP id 82505277A9 for ; Wed, 31 May 2006 15:51:19 +0200 (CEST) Subject: [MEMORY]Free memory From: yves pielusenet To: Derby Discussion Content-Type: text/plain Date: Wed, 31 May 2006 15:56:06 +0200 Message-Id: <1149083766.7786.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, I developpe an application which create several derby databases. It may be 2 ddatabase or 100. In my application, I have a class which create those databases and connexions. Here the constructor method : ----------------------------------------------------------------------- DBGenConnection(String purl, String pdbname, boolean cancreatedb, boolean autocommit, String alterTableCreateIndex){ this.alterTableCreateIndex = alterTableCreateIndex; String url = "jdbc:derby:"+purl+pdbname+";create="+cancreatedb; url = System.getProperty("db_url", url); try{ String driver = "org.apache.derby.jdbc.EmbeddedDriver"; String passwd = System.getProperty("db_passwd", ""); String user = ""; user = System.getProperty("db_user", user); Class.forName(driver); // create the conenxion con = DriverManager.getConnection(url, user, passwd); con.setAutoCommit(false); } catch(Exception e){ System.err.println("erreur : "+e); } } ---------------------------------------------------------------------- When I finish to deal with one database, I close it before create the next one. when I close a database I only do 'myConnection.commit()' and 'myConnection.close()' and that's all. I run a java memerory profiler and it seems that when I close a databse, memory is not completly free. Is there something to do closing a database to free all memory use by this database ? thanks -- yves piel