Author: dfranke
Date: Fri Apr 10 05:37:41 2009
New Revision: 34664
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34664&view=rev
Log:
Fix another GUI memory leak
Modified:
branches/1.6/src/help.cpp
branches/1.6/src/help.hpp
trunk/src/help.cpp
trunk/src/help.hpp
Modified: branches/1.6/src/help.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/help.cpp?rev=34664&r1=34663&r2=34664&view=diff
==============================================================================
--- branches/1.6/src/help.cpp (original)
+++ branches/1.6/src/help.cpp Fri Apr 10 05:37:41 2009
@@ -42,6 +42,10 @@
help_button::help_button(display& disp, const std::string &help_topic)
: dialog_button(disp.video(), _("Help")), disp_(disp),
topic_(help_topic), help_hand_(NULL)
{}
+
+help_button::~help_button() {
+ delete help_hand_;
+}
int help_button::action(gui::dialog_process_info &info) {
if(!topic_.empty()) {
Modified: branches/1.6/src/help.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/help.hpp?rev=34664&r1=34663&r2=34664&view=diff
==============================================================================
--- branches/1.6/src/help.hpp (original)
+++ branches/1.6/src/help.hpp Fri Apr 10 05:37:41 2009
@@ -50,6 +50,7 @@
class help_button : public gui::dialog_button, public hotkey::command_executor
{
public:
help_button(display& disp, const std::string &help_topic);
+ ~help_button();
int action(gui::dialog_process_info &info);
std::string topic() const { return topic_; }
void join();
Modified: trunk/src/help.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=34664&r1=34663&r2=34664&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Fri Apr 10 05:37:41 2009
@@ -43,6 +43,10 @@
help_button::help_button(display& disp, const std::string &help_topic)
: dialog_button(disp.video(), _("Help")), disp_(disp),
topic_(help_topic), help_hand_(NULL)
{}
+
+help_button::~help_button() {
+ delete help_hand_;
+}
int help_button::action(gui::dialog_process_info &info) {
if(!topic_.empty()) {
Modified: trunk/src/help.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.hpp?rev=34664&r1=34663&r2=34664&view=diff
==============================================================================
--- trunk/src/help.hpp (original)
+++ trunk/src/help.hpp Fri Apr 10 05:37:41 2009
@@ -50,6 +50,7 @@
class help_button : public gui::dialog_button, public hotkey::command_executor
{
public:
help_button(display& disp, const std::string &help_topic);
+ ~help_button();
int action(gui::dialog_process_info &info);
std::string topic() const { return topic_; }
void join();
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits