Return-Path: Delivered-To: apmail-xmlgraphics-batik-users-archive@www.apache.org Received: (qmail 20647 invoked from network); 9 May 2006 02:05:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 May 2006 02:05:32 -0000 Received: (qmail 92576 invoked by uid 500); 9 May 2006 02:05:31 -0000 Delivered-To: apmail-xmlgraphics-batik-users-archive@xmlgraphics.apache.org Received: (qmail 92566 invoked by uid 500); 9 May 2006 02:05:31 -0000 Mailing-List: contact batik-users-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-users@xmlgraphics.apache.org Delivered-To: mailing list batik-users@xmlgraphics.apache.org Received: (qmail 92550 invoked by uid 99); 9 May 2006 02:05:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 May 2006 19:05:30 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: unknown (asf.osuosl.org: error in processing during lookup of archie@dellroad.org) Received: from [216.239.128.26] (HELO smtp.omnis.com) (216.239.128.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 May 2006 19:05:30 -0700 Received: from [10.2.2.50] (24-158-230-170.dhcp.leds.al.charter.com [24.158.230.170]) by smtp-relay.omnis.com (Postfix) with ESMTP id 8563B1407885 for ; Mon, 8 May 2006 19:05:07 -0700 (PDT) Message-ID: <445FF926.4090206@dellroad.org> Date: Mon, 08 May 2006 21:06:30 -0500 From: Archie Cobbs User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060411) X-Accept-Language: en-us, en MIME-Version: 1.0 To: batik-users@xmlgraphics.apache.org Subject: Re: Memory & Dynamic Canvas References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 Greg Steele wrote: > I've been trying to track down a major memory leak in my app. After > creating a very simple test app, I was able to determine that setting > canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC) was somehow causing > unused objects to remain on the heap after I removed the canvas from the > container. The memory leak goes away when I leave the canvas static; I can > close and reopen the same SVG doc indefinitely. > > Perhaps, I'm not closing the canvas correctly? Currently, I just remove it > from its parent container. FWIW, my application uses a different JSVGCanvas for each image displayed and we don't see any leaking memory after loading several images. Are you sure that you're not retaining a reference to some object somewhere that might indirectly reference the JSVGCanvas? FYI here's what we invoke when discarding a JSVGCanvas object: canvas.stopProcessing(); canvas.dispose(); Try adding one or both of those when you discard to see if that helps... just a wild guess. -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org