incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@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 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=113606

zhang jianfang <zhangjf@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79380|                            |review?
              Flags|                            |

--- Comment #4 from zhang jianfang <zhangjf@apache.org> ---
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.

Mime
View raw message