From odf-dev-return-620-apmail-incubator-odf-dev-archive=incubator.apache.org@incubator.apache.org Fri Feb 3 09:58:33 2012 Return-Path: X-Original-To: apmail-incubator-odf-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-odf-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DBCB39278 for ; Fri, 3 Feb 2012 09:58:32 +0000 (UTC) Received: (qmail 9233 invoked by uid 500); 3 Feb 2012 09:58:31 -0000 Delivered-To: apmail-incubator-odf-dev-archive@incubator.apache.org Received: (qmail 9095 invoked by uid 500); 3 Feb 2012 09:58:21 -0000 Mailing-List: contact odf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: odf-dev@incubator.apache.org Delivered-To: mailing list odf-dev@incubator.apache.org Received: (qmail 9072 invoked by uid 99); 3 Feb 2012 09:58:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 09:58:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 09:58:15 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DD2C918A951 for ; Fri, 3 Feb 2012 09:57:53 +0000 (UTC) Date: Fri, 3 Feb 2012 09:57:53 +0000 (UTC) From: "Devin Han (Commented) (JIRA)" To: odf-dev@incubator.apache.org Message-ID: <788157257.6946.1328263073907.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <556041389.37538.1326448419556.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (ODFTOOLKIT-300) Memory Leak in ODF Simple API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ODFTOOLKIT-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199625#comment-13199625 ] Devin Han commented on ODFTOOLKIT-300: -------------------------------------- Hi Mathias, Could you submit a test case? Thanks! Devin > Memory Leak in ODF Simple API > ----------------------------- > > Key: ODFTOOLKIT-300 > URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-300 > Project: ODF Toolkit > Issue Type: Bug > Components: simple api > Affects Versions: 0.8.7 > Environment: odfdom-java-0.8.7.jar; simple-odf-0.6.6.jar > Reporter: Mathias Silbermann > Assignee: Devin Han > > There is a memory leak in the ODF Simple API. I tried both, versions 0.6.6 and 0.6.5. It appears when running code like the examples on cookbook page > http://incubator.apache.org/odftoolkit/simple/document/cookbook/Manipulate%20TextSearch.html > In short, the call TextNavigation.nextSelection() leads to the leak. When you look down the method's call stack, you will find that items are added to the static variable "repository" of the static inner class "Selection.SelectionManager". The added items are never removed from the repository. One indication is that the method Selection.SelectionManager.unregisterItem() is never called. > The code works fine if text navigation is done with few documents. But when its run on a server thousands of times, it will fill the JVMs memory. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira