summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/login.cpp5
-rw-r--r--src/gui/login.h2
-rw-r--r--src/gui/partywindow.cpp3
-rw-r--r--src/gui/setup_players.cpp5
-rw-r--r--src/gui/setup_players.h2
-rw-r--r--src/main.cpp3
6 files changed, 15 insertions, 5 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;
diff --git a/src/main.cpp b/src/main.cpp
index f6d4a4f5..f6126693 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -947,8 +947,7 @@ int main(int argc, char *argv[])
new TmwServ::GeneralHandler; // Currently doesn't need registration
#else
Network *network = new Network;
- EAthena::GeneralHandler *generalHandler = new EAthena::GeneralHandler;
- network->registerHandler(generalHandler);
+ network->registerHandler(new EAthena::GeneralHandler);
#endif
Net::getGeneralHandler()->load();