summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-28 15:44:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-28 15:45:36 +0100
commit26a21cd45bd499c029f3d0344410dc808761987e (patch)
tree9f1691700c87d9385df83ad83065ed7ac5336101 /unoxml
parent351af6e43636ed581c963582bcf58a00faf04f36 (diff)
callcatcher: unused dtor->fix leak
The other option I suppose is that in CEventDispatcher::removeListener when a map becomes empty then delete the map Change-Id: Icb108e3beb9eb7ce7f04f9e49b24e9cc77830b5d
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/events/eventdispatcher.cxx10
-rw-r--r--unoxml/source/events/eventdispatcher.hxx2
2 files changed, 12 insertions, 0 deletions
diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx
index 70da8370d015..665815b686d3 100644
--- a/unoxml/source/events/eventdispatcher.cxx
+++ b/unoxml/source/events/eventdispatcher.cxx
@@ -74,6 +74,16 @@ namespace DOM { namespace events {
}
}
+ CEventDispatcher::~CEventDispatcher()
+ {
+ // delete the multimaps for the various types
+ for (TypeListenerMap::iterator aI = m_CaptureListeners.begin(); aI != m_CaptureListeners.end(); ++aI)
+ delete aI->second;
+
+ for (TypeListenerMap::iterator aI = m_TargetListeners.begin(); aI != m_TargetListeners.end(); ++aI)
+ delete aI->second;
+ }
+
void CEventDispatcher::callListeners(
TypeListenerMap const& rTMap,
xmlNodePtr const pNode,
diff --git a/unoxml/source/events/eventdispatcher.hxx b/unoxml/source/events/eventdispatcher.hxx
index 479827784617..cb2170199cc4 100644
--- a/unoxml/source/events/eventdispatcher.hxx
+++ b/unoxml/source/events/eventdispatcher.hxx
@@ -79,6 +79,8 @@ public:
xmlNodePtr const pNode,
Reference<XNode> const& xNode,
Reference< XEvent > const& xEvent) const;
+
+ ~CEventDispatcher();
};
}}