You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/09/10 10:05:30 UTC
[Bug 113606] forms: When opening a form document, it expose obvious
memory leak after it is closed
https://issues.apache.org/ooo/show_bug.cgi?id=113606
zhang jianfang <zh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #79380| |review?
Flags| |
--- Comment #4 from zhang jianfang <zh...@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.