diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-15 22:08:41 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-15 22:08:41 -0600 |
commit | 871af4828a0fc64637b8e08ca2d1df6233849d55 (patch) | |
tree | 7886a4b074f3a23a9ef14823b51e3582938da155 /src/gui | |
parent | 6b59adabfcf909cb02075e2fab2d715b4e34af95 (diff) | |
download | mana-client-871af4828a0fc64637b8e08ca2d1df6233849d55.tar.gz mana-client-871af4828a0fc64637b8e08ca2d1df6233849d55.tar.bz2 mana-client-871af4828a0fc64637b8e08ca2d1df6233849d55.tar.xz mana-client-871af4828a0fc64637b8e08ca2d1df6233849d55.zip |
Clean up some more memory leaks
And remove an unneeded variable
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/login.cpp | 5 | ||||
-rw-r--r-- | src/gui/login.h | 2 | ||||
-rw-r--r-- | src/gui/partywindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/setup_players.cpp | 5 | ||||
-rw-r--r-- | src/gui/setup_players.h | 2 |
5 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 92c6050c..c1ffb658 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -129,6 +129,11 @@ LoginDialog::LoginDialog(LoginData *loginData): mOkButton->setEnabled(canSubmit()); } +LoginDialog::~LoginDialog() +{ + delete mServerList; +} + void LoginDialog::action(const gcn::ActionEvent &event) { if (event.getId() == "ok" && canSubmit()) diff --git a/src/gui/login.h b/src/gui/login.h index 7224c64d..6d35f5ba 100644 --- a/src/gui/login.h +++ b/src/gui/login.h @@ -51,6 +51,8 @@ class LoginDialog : public Window, public gcn::ActionListener, */ LoginDialog(LoginData *loginData); + ~LoginDialog(); + /** * Called when receiving actions from the widgets. */ diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp index aea1388b..9c2d3161 100644 --- a/src/gui/partywindow.cpp +++ b/src/gui/partywindow.cpp @@ -26,6 +26,7 @@ #include "net/net.h" #include "net/partyhandler.h" +#include "utils/dtor.h" #include "utils/gettext.h" #include "utils/strprintf.h" @@ -45,7 +46,7 @@ PartyWindow::PartyWindow() : Window(_("Party")) PartyWindow::~PartyWindow() { - mMembers.clear(); + delete_all(mMembers); } void PartyWindow::draw(gcn::Graphics *graphics) diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp index e093a5b6..367d21a2 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -240,8 +240,8 @@ Setup_Players::Setup_Players(): RELATION_CHOICE_COLUMN_WIDTH); mPlayerTitleTable->setBackgroundColor(gcn::Color(0xbf, 0xbf, 0xbf)); - gcn::ListModel *ignoreChoices = new IgnoreChoicesListModel; - mIgnoreActionChoicesBox = new DropDown(ignoreChoices); + mIgnoreActionChoicesModel = new IgnoreChoicesListModel; + mIgnoreActionChoicesBox = new DropDown(mIgnoreActionChoicesModel); for (int i = 0; i < COLUMNS_NR; i++) { @@ -300,6 +300,7 @@ Setup_Players::Setup_Players(): Setup_Players::~Setup_Players() { player_relations.removeListener(this); + delete mIgnoreActionChoicesModel; } diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h index 14b9a018..c2e6a682 100644 --- a/src/gui/setup_players.h +++ b/src/gui/setup_players.h @@ -63,6 +63,8 @@ private: gcn::CheckBox *mDefaultWhisper; gcn::Button *mDeleteButton; + + gcn::ListModel *mIgnoreActionChoicesModel; gcn::DropDown *mIgnoreActionChoicesBox; bool mWhisperTab; |