https://issues.apache.org/ooo/show_bug.cgi?id=113606

zhang jianfang <[email protected]> changed:

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

--- Comment #4 from zhang jianfang <[email protected]> ---
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.

Reply via email to