From ece8fcdd4a17000285052941148afa056e0a40b7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 6 Jun 2010 01:09:42 +0300 Subject: Fix memory leak in statuswindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Thorbjørn Lindeijer --- src/gui/statuswindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui/statuswindow.cpp') diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index 2439a213..ede85133 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -50,6 +50,8 @@ class AttrDisplay : public Container DERIVED, CHANGEABLE, UNKNOWN }; + ~AttrDisplay(); + virtual std::string update(); virtual Type getType() { return UNKNOWN; } @@ -386,6 +388,11 @@ AttrDisplay::AttrDisplay(int id, const std::string &name): mLayout = new LayoutHelper(this); } +AttrDisplay::~AttrDisplay() +{ + delete mLayout; +} + std::string AttrDisplay::update() { int base = player_node->getAttributeBase(mId); -- cgit v1.2.3-70-g09d2