Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 13062 invoked from network); 18 Jun 2002 19:56:10 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 18 Jun 2002 19:56:10 -0000 Received: (qmail 10948 invoked by uid 97); 18 Jun 2002 19:56:17 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 10803 invoked by uid 97); 18 Jun 2002 19:56:16 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 10733 invoked by uid 98); 18 Jun 2002 19:56:16 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: From: Dominique Devienne To: "'Ant Developers List'" Subject: RE: Task to perform garbage collection Date: Tue, 18 Jun 2002 14:56:07 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I've always heard this wasn't of much use... The Java language 3rd edition as a snippet of code doing it in a loop, querying the memory available to see if it increases, but warns it can have little to no effect, and can actually impair some VMs. JProbe's kind of the unique way to know for sure where's the memory going, but it's far from free unfortunately. Using WeakReference instead of hard references is a good start to avoid leaking too much memory. We've used JProbe successfully on our projects (not me though), especially related to Swing and the classical listener pattern. As I've learned in my use of Ant, forking is the safest approach for most heavyweight tasks, but Ant's own memory usage is another problem. --DD -----Original Message----- From: Magesh Umasankar [mailto:umagesh@apache.org] Sent: Tuesday, June 18, 2002 2:37 PM To: Ant Developers List Subject: Task to perform garbage collection Hi, I propose to create a very simple task named or that * invokes System.runFinalization(); and then * invokes System.gc(); This gives the build writer a chance to suggest to the JVM to free up memory just before start of a heavy-weight job, for instance. Comments? Cheers, Magesh ********************************************* * When in doubt, mumble; when in trouble, * * delegate; when in charge, ponder. * * - James H. Boren * ********************************************* -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: