sfx2/source/dialog/backingwindow.cxx | 3 +-- sfx2/source/dialog/backingwindow.hxx | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 75f25d00848068c677fca450d35aa59af0422c60 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Dec 10 13:38:52 2015 +0100 Memory leak (cherry picked from commit 5ac6e00274e732435b55c2908db9cea658fe549b) Conflicts: sfx2/source/dialog/backingwindow.cxx Change-Id: Ica40750d628946678019376d91db67ba3f9ed67e Reviewed-on: https://gerrit.libreoffice.org/20601 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index e58505b..a0486c9 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -95,7 +95,6 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) : mbIsSaveMode( false ), mbInitControls( false ), mnHideExternalLinks( 0 ), - mpAccExec( NULL ), maSelTemplates(cmpSelectionItems), maSelFolders(cmpSelectionItems) @@ -445,7 +444,7 @@ bool BackingWindow::Notify( NotifyEvent& rNEvt ) // try the 'normal' accelerators (so that eg. Ctrl+Q works) if( !mpAccExec ) { - mpAccExec = svt::AcceleratorExecute::createAcceleratorHelper(); + mpAccExec.reset(svt::AcceleratorExecute::createAcceleratorHelper()); mpAccExec->init( comphelper::getProcessComponentContext(), mxFrame); } const KeyEvent* pEvt = rNEvt.GetKeyEvent(); diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index c2c1462..ec06cc4 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -44,6 +44,7 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XDesktop2.hpp> +#include <memory> #include <set> class ToolBox; @@ -91,7 +92,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer bool mbIsSaveMode; bool mbInitControls; sal_Int32 mnHideExternalLinks; - svt::AcceleratorExecute* mpAccExec; + std::unique_ptr<svt::AcceleratorExecute> mpAccExec; void setupButton(PushButton* pButton); void setupButton(MenuButton* pButton); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits