From 17ffac2ae99d52cd5d7914f9d3003a377e56e424 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 9 Oct 2007 09:29:27 +0000 Subject: [PATCH] Fix memory leak. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20865 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiToc.cpp | 6 ++++++ src/frontends/qt4/GuiToc.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/frontends/qt4/GuiToc.cpp b/src/frontends/qt4/GuiToc.cpp index 13cd95f782..47c67604cb 100644 --- a/src/frontends/qt4/GuiToc.cpp +++ b/src/frontends/qt4/GuiToc.cpp @@ -52,6 +52,12 @@ GuiToc::GuiToc(GuiViewBase & parent, Qt::DockWidgetArea area, Qt::WindowFlags fl } +GuiToc::~GuiToc() +{ + delete widget_; +} + + int GuiToc::getTocDepth(int type) { if (type < 0) diff --git a/src/frontends/qt4/GuiToc.h b/src/frontends/qt4/GuiToc.h index a308f06ade..4c9b6d64fc 100644 --- a/src/frontends/qt4/GuiToc.h +++ b/src/frontends/qt4/GuiToc.h @@ -44,6 +44,8 @@ public: Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer) Qt::WindowFlags flags = 0); + ~GuiToc(); + /// bool initialiseParams(std::string const & data); /// -- 2.39.5