diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-02-02 13:12:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-02 15:06:02 +0000 |
commit | 4f68489ae200d31be8f53fb1818abb2c9427611d (patch) | |
tree | 6d76ed6e6d5b810789fd97a3a829e2183c0afec4 /framework/source/inc/dispatch | |
parent | 9b9ebc460bee25e974509d5ea614f30a3be36455 (diff) |
Fix per-frame leak
This was defined as a uno listener, but wasn't registered as a uno listener,
but was a vcl listener. There was no route for it to be released despite all
the optimistic comments.
Diffstat (limited to 'framework/source/inc/dispatch')
-rw-r--r-- | framework/source/inc/dispatch/windowcommanddispatch.hxx | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/framework/source/inc/dispatch/windowcommanddispatch.hxx b/framework/source/inc/dispatch/windowcommanddispatch.hxx index 03aded6ad1ad..549c6d9e69ae 100644 --- a/framework/source/inc/dispatch/windowcommanddispatch.hxx +++ b/framework/source/inc/dispatch/windowcommanddispatch.hxx @@ -67,13 +67,12 @@ namespace css = ::com::sun::star; e.g. "Pereferences" or "About". These menu entries trigger hard coded commands. Here we map these commands to the right URLs and dispatch them. - This helper knows a frame and it's container window (where VCL provide the hard coded - commands). We hold those objects weak ... so there is no need to react for complex dispose/ing() + This helper knows a frame and its container window (where VCL provide the hard coded + commands). We hold those objects weak so there is no need to react for complex UNO dispose/ing() scenarios. On the other side VCL does not hold us alive (because it doesn't know our UNO reference). - So we register us at the XWindow as event listener also to be sure to live as long the XWindow/VCLWindow lives. + So we register at the VCL level as an event listener and */ class WindowCommandDispatch : private ThreadHelpBase - , public ::cppu::WeakImplHelper1< css::lang::XEventListener > { //___________________________________________ // const @@ -129,15 +128,6 @@ class WindowCommandDispatch : private ThreadHelpBase virtual ~WindowCommandDispatch(); //___________________________________________ - // uno interface - - public: - - // XEventListener - virtual void SAL_CALL disposing(const css::lang::EventObject& aSource) - throw (css::uno::RuntimeException); - - //___________________________________________ // implementation private: @@ -148,11 +138,15 @@ class WindowCommandDispatch : private ThreadHelpBase @descr Those listener connections will be created one times only (see ctor). Afterwards we listen for incoming events till our referred frame/window pair - will be closed. All objects die by refcount automatically. Because we hold - it weak ... + will be closed. */ void impl_startListening(); + /** @short drop all listener connections we need. + + */ + void impl_stopListening(); + //_______________________________________ /** @short callback from VCL to notify new commands |