summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-10 12:23:50 -0600
committerIra Rice <irarice@gmail.com>2009-03-15 13:21:03 -0600
commitd6f89802e5aa32f266e881e43d6005e821040c57 (patch)
tree8279ca50117fced2dc26f7e6d4bdd7d5694af255 /src/gui
parent4b459b50521f5d7a0518e229a20f14ed2f1d22f9 (diff)
downloadmana-client-d6f89802e5aa32f266e881e43d6005e821040c57.tar.gz
mana-client-d6f89802e5aa32f266e881e43d6005e821040c57.tar.bz2
mana-client-d6f89802e5aa32f266e881e43d6005e821040c57.tar.xz
mana-client-d6f89802e5aa32f266e881e43d6005e821040c57.zip
Fix some mem leaks
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chat.cpp2
-rw-r--r--src/gui/setup.cpp2
-rw-r--r--src/gui/setup_colors.cpp5
-rw-r--r--src/gui/skill.cpp2
-rw-r--r--src/gui/table.cpp1
-rw-r--r--src/gui/window.cpp2
6 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 098d4e46..44e08052 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -109,6 +109,8 @@ ChatWindow::~ChatWindow()
config.setValue("PartyPrefix", partyPrefix);
config.setValue("ReturnToggles", mReturnToggles ? "1" : "0");
delete mRecorder;
+ delete mItemLinkHandler;
+ delete mParty;
}
void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index ab0b2245..dc232296 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -108,6 +108,8 @@ Setup::Setup():
add(panel);
setLocationRelativeTo(getParent());
+
+ setInGame(false);
}
Setup::~Setup()
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index 760fdc1f..148fd679 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -62,9 +62,8 @@ Setup_Colors::Setup_Colors() :
mPreview = new BrowserBox(BrowserBox::AUTO_WRAP);
mPreview->setOpaque(false);
- // Replace this later with a more appropriate link handler. For now, this'll
- // do, as it'll do nothing when clicked on.
- mPreview->setLinkHandler(new ItemLinkHandler());
+ // don't do anything with links
+ mPreview->setLinkHandler(NULL);
mPreviewBox = new ScrollArea(mPreview);
mPreviewBox->setHeight(20);
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index 64214ff5..9fbae7a6 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -161,7 +161,7 @@ SkillDialog::SkillDialog():
SkillDialog::~SkillDialog()
{
- delete mTable;
+ delete_all(mSkillList);
}
void SkillDialog::action(const gcn::ActionEvent &event)
diff --git a/src/gui/table.cpp b/src/gui/table.cpp
index 144e7e21..fa801865 100644
--- a/src/gui/table.cpp
+++ b/src/gui/table.cpp
@@ -99,6 +99,7 @@ GuiTable::GuiTable(TableModel *initial_model, gcn::Color background,
GuiTable::~GuiTable(void)
{
+ uninstallActionListeners();
delete mModel;
}
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index e6e79b45..404f5746 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -124,6 +124,8 @@ Window::~Window()
delete(w);
}
+ removeWidgetListener(this);
+
instances--;
mSkin->instances--;