Return-Path: X-Original-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6324D270 for ; Mon, 10 Sep 2012 08:05:56 +0000 (UTC) Received: (qmail 29554 invoked by uid 500); 10 Sep 2012 08:05:56 -0000 Delivered-To: apmail-incubator-ooo-issues-archive@incubator.apache.org Received: (qmail 29479 invoked by uid 500); 10 Sep 2012 08:05:56 -0000 Mailing-List: contact ooo-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-issues@incubator.apache.org Delivered-To: mailing list ooo-issues@incubator.apache.org Received: (qmail 29471 invoked by uid 99); 10 Sep 2012 08:05:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2012 08:05:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.123] (HELO sif.zones.apache.org) (140.211.11.123) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2012 08:05:54 +0000 Received: by sif.zones.apache.org (Postfix, from userid 80) id E3E4C7B37; Mon, 10 Sep 2012 08:05:34 +0000 (UTC) From: bugzilla@apache.org To: ooo-issues@incubator.apache.org Subject: [Bug 113606] forms: When opening a form document, it expose obvious memory leak after it is closed Date: Mon, 10 Sep 2012 08:05:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: tools X-Bugzilla-Component: code X-Bugzilla-Keywords: X-Bugzilla-Severity: trivial X-Bugzilla-Who: zhangjf@apache.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: frank.schoenheit@gmx.de X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: flagtypes.name Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/ooo/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/ooo/show_bug.cgi?id=113606 zhang jianfang changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79380| |review? Flags| | --- Comment #4 from zhang jianfang --- Created attachment 79380 --> https://issues.apache.org/ooo/attachment.cgi?id=79380&action=edit fix code patch When loading a doc with forms, in XFormsModelContext::XFormsModelContext(), it creates a xforms::Model object, then in XFormsModelContext::HandleChild(), the created xforms::Model object is used to create XFormsBindContext and XFormsSubmissionContext objects. In their ctor apis, several binding and submission objects are created with api mxModel->createxxxx(), and put into XFormsModelContext bindings and submissions xset object. The memory leak is caused by cyclic reference between XFormsModelContext and binding/submission objects. To break the cyclic reference, in SwDoc dtor api, all binding/submission objects in XFormsModelContext xset collection object should be released at first. So the fix is to create a new method SwDoc::disposeXForms() to break the cyclic reference. -- You are receiving this mail because: You are on the CC list for the bug.