Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 43655 invoked from network); 5 Oct 2007 13:57:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2007 13:57:38 -0000 Received: (qmail 17740 invoked by uid 500); 5 Oct 2007 13:57:24 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 17723 invoked by uid 500); 5 Oct 2007 13:57:24 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 17712 invoked by uid 99); 5 Oct 2007 13:57:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 06:57:24 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of larry.meadors@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 13:57:27 +0000 Received: by ug-out-1314.google.com with SMTP id h2so663100ugf for ; Fri, 05 Oct 2007 06:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=sYce7nBSSHXhbj7V3dXlqXX8MCVVZo6VwNuT/V5RDnI=; b=R9rHbSMcRLUVaF4ze1bGFrLSl/FNNg+0IMg4XBn/H852SUs7S9be1YaDTH4L652DK0JqD5d101ujoQizdQiLJsLOOtkAElOtAyQY8UEwJyaCYWf07NuJeqZmtm0ZxE6oydrP7AzAJBzIKDGN4uRIpyIgpP2kPU9+SgSOQQGTkhk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Ss6xYRr165+GBunpXtiZ5T0Ep/veKKg54fe3f3MiQNzerwm+CM3X762RAAsApkNt3mKyzM2VfzbxWkByQ7vGLwHdfK4NufFueX2iMZjK9a5IwwCbcdVu17kbpNFQBN5G9riXTaNiIPyeokkHoVG5TymqAwNzL3TT+AzrqXyHBJ4= Received: by 10.66.252.18 with SMTP id z18mr3322318ugh.1191592624954; Fri, 05 Oct 2007 06:57:04 -0700 (PDT) Received: by 10.67.93.8 with HTTP; Fri, 5 Oct 2007 06:57:04 -0700 (PDT) Message-ID: Date: Fri, 5 Oct 2007 07:57:04 -0600 From: "Larry Meadors" Reply-To: lmeadors@apache.org Sender: larry.meadors@gmail.com To: user-java@ibatis.apache.org Subject: Re: iBatis cleanup In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Google-Sender-Auth: 0fe0e289efc74ea5 X-Virus-Checked: Checked by ClamAV on apache.org As with anything, you can set them to null just to be safe - if you do that, the GC *may* get them sooner than if you don't. If you don't set them to null, they'll remain referenced by the containing object and not be collectible until the containing objects are destroyed by the GC, which is kind of indeterminable. :-) Larry On 10/5/07, Tom Henricksen wrote: > > We have an application that has a ServletContextListener that creates three > SqlMapClients in the contextInitialized. When the application is shutting > down(in the contextDestroyed) should we just null out those SqlMapClient or > does it matter. > > > > Called from the contextDestroyed > > > > public static void stopService() { > > //Get ready for garbage collection > > singleton = null; > > reportingClientSingleton = null; > > nestedTransactionSingleton = null; > > } > > > > We have some memory leaks from our Websphere production environment and I > just want tidy things up. > > > > Thanks, > > > > Tom Henricksen > Consultant > Advanced Technologies Group, Inc.