Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 62373 invoked by uid 500); 12 Jul 2001 06:31:43 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 62352 invoked from network); 12 Jul 2001 06:31:41 -0000 Received: from brev.stud.ntnu.no (postfix@129.241.56.70) by h31.sny.collab.net with SMTP; 12 Jul 2001 06:31:41 -0000 Received: from localhost (localhost [127.0.0.1]) by brev.stud.ntnu.no (Postfix) with ESMTP id A8B72807D; Thu, 12 Jul 2001 08:31:46 +0200 (CEST) Received: from jeeves.stud.ntnu.no (jeeves [129.241.56.14]) by brev.stud.ntnu.no (Postfix) with ESMTP id 1AF8D8083; Thu, 12 Jul 2001 08:31:46 +0200 (CEST) Received: from localhost (endrs@localhost) by jeeves.stud.ntnu.no (8.10.0.Beta12/8.10.0.Beta12) with ESMTP id f6C6Vjx00487; Thu, 12 Jul 2001 08:31:45 +0200 (MET DST) X-Authentication-Warning: jeeves.stud.ntnu.no: endrs owned process doing -bs Date: Thu, 12 Jul 2001 08:31:45 +0200 (MET DST) From: =?iso-8859-1?Q?Endre_St=F8lsvik?= X-X-Sender: To: , Boris Niyazov Subject: Re: Tomcat memory-leak problem In-Reply-To: <200107112125.RAA28781@solni.law.columbia.edu> Message-ID: X-Endre-Message: Atombombs and war are bad. Flowers and peace are good. ;-D MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS perl-10 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Wed, 11 Jul 2001, Boris Niyazov wrote: | You should probably look at your code for possible memoey leaks: not closed db | objects (statements, result sets, connections) not closed file descriptors, etc. More important, I think, is stuff you shove inside Collections. The RS'es, Files and all that stuff will eventually be GC'ed when they go out of scope, that is, no reference is left for them. (IF they do, of course). Only way to have leaks in Java is to make objects that are in your "working set" (reachable set) of objects and that never goes out of scope. --> Like some caching mechanism where the only thing you do is to _add_ objects to the cache, and never release them. -- Mvh, Endre