Return-Path: X-Original-To: apmail-pivot-user-archive@www.apache.org Delivered-To: apmail-pivot-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB4DDDACD for ; Wed, 18 Jul 2012 21:03:18 +0000 (UTC) Received: (qmail 38030 invoked by uid 500); 18 Jul 2012 21:03:18 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 38001 invoked by uid 500); 18 Jul 2012 21:03:18 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 37992 invoked by uid 99); 18 Jul 2012 21:03:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 21:03:18 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ss401533@gmail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-ob0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 21:03:12 +0000 Received: by obbun3 with SMTP id un3so3493823obb.13 for ; Wed, 18 Jul 2012 14:02:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=bgAbdzHujAGsvg+D9o4BVl8YHgQks1+57zo3W4INdXc=; b=c240H9IAWIdhQxip33unFSRT8IKg/IOofujhr6q6hOFZomrjHiRQ7PIVoXFvylE4eG +6pJ+FpuQOXjVSn6zym5bNJzo1aWk5dYhDVmBZFUEHBUfRoxDiC5Quh88SEyGc7h2OJW 7d7b6w8OdFClbCMhXXwtepp7NqaP4nFcQXnOAkUZEbPrrYbcwltp8r86plI0lzU+P34Z 7KoIuIIQp37jXdRMMNF1mLgy8zjK5L4aa2QeR0URjmu4TYgiWgnYLLi3nIJULYJebWDZ G0UMw3wd2GNcafxY39eShv9IXSP+zF++BFmQ2fovrgzRGNAFr0hdjPddoyTA7zxkRBtV Mc0Q== MIME-Version: 1.0 Received: by 10.182.12.74 with SMTP id w10mr3335725obb.54.1342645371630; Wed, 18 Jul 2012 14:02:51 -0700 (PDT) Received: by 10.60.46.7 with HTTP; Wed, 18 Jul 2012 14:02:51 -0700 (PDT) Date: Wed, 18 Jul 2012 14:02:51 -0700 Message-ID: Subject: OutOfMemoryError - after calling ImageView.setImage(url) 50 times From: Sridhar Sarnobat To: user@pivot.apache.org Content-Type: multipart/alternative; boundary=f46d044468db6f730704c520fce1 X-Virus-Checked: Checked by ClamAV on apache.org --f46d044468db6f730704c520fce1 Content-Type: text/plain; charset=ISO-8859-1 I have created a slideshow application using Apache Pivot, and it works great. But it reaches 285 MB after I cycle through about 50 jpg images, and starts throwing OOM errors. *I have a memory leak that I don't know how to stop.* I am manipulating java.io.File objects (not streams or readers) and I don't see any way to close these files. I believe that I am not releasing resources of a File 1 before calling the following line with File 2: org.apache.pivot.wtk.ImageView.setImage( java.io.File.toURI().toURL() ) I hope that's enough information. What am I doing wrong? I don't want to increase the available heap space. This is supposed to be a simple app. --f46d044468db6f730704c520fce1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have created a slideshow appl= ication using Apache Pivot, and it works great.

But it reaches 285 MB after I cycle through about 50 jpg images, and starts= throwing OOM errors.=A0I have a memory leak that I don'= ;t know how to stop.=A0I am manipulating java.io.File obje= cts (not streams or readers) and I don't see any way to close these fil= es.

I believe that I am not releasing resources of a File 1 before calling the = following line with File 2:

=A0 org.apache.pivot.wtk.ImageView.se= tImage( java.io.File.toURI().toURL() )

I hope that's enough information. What am I doing wrong? I don't wa= nt to increase the available heap space. This is supposed to be a simple ap= p.
--f46d044468db6f730704c520fce1--