Issue 124623 - Memory leak with extension's Options page
Summary: Memory leak with extension's Options page
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.2.0
Assignee: Ariel Constenla-Haile
QA Contact:
Depends on:
Reported: 2014-04-07 23:00 UTC by Ariel Constenla-Haile
Modified: 2017-05-20 10:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2014-04-07 23:00:37 UTC
Steps "to reproduce it":

- Create a C++ extension that adds Options pages to OpenOffice's Options dialog, see

- The extension has to provide a component implementing, see

- The lifetime of this C++ UNO object is controlled by reference count. The application terminates without the object being deleted, with a reference count > 0.
Comment 1 Ariel Constenla-Haile 2014-04-07 23:18:02 UTC
The extension's event handler is kept alive by the dlgprov::DialogEventsAttacherImpl and its dlgprov::DialogUnoScriptListenerImpl holding a reference to it. These in turn are kept alive because they are listening at the toolkit controls. The toolkit controls are in turn kept alive because the one that creates the container window never disposes it.

Disposing m_xPage in ExtensionsTabPage::~ExtensionsTabPage() fixes these memory leaks.
Comment 2 SVN Robot 2014-04-07 23:53:56 UTC
"arielch" committed SVN revision 1585624 into trunk:
i124623 - Dispose extension's Options page to avoid memory leaks
Comment 3 Ariel Constenla-Haile 2014-04-07 23:59:55 UTC
Fixed with commit from comment 2.
Verified running AOO under valgrind.
Comment 4 Oliver Brinzing 2014-04-10 06:45:54 UTC