summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-10 17:46:02 -0700
committerIra Rice <irarice@gmail.com>2009-02-10 17:46:02 -0700
commitf5f67e6411fb8338664372c7bc5e8f6cbeda73f4 (patch)
tree6f96ac33b67e2c109944c51eda2ffb19259752c4
parentd067d7da8e6ee333a4941d4fe6ee9eb926d37f00 (diff)
downloadmana-client-f5f67e6411fb8338664372c7bc5e8f6cbeda73f4.tar.gz
mana-client-f5f67e6411fb8338664372c7bc5e8f6cbeda73f4.tar.bz2
mana-client-f5f67e6411fb8338664372c7bc5e8f6cbeda73f4.tar.xz
mana-client-f5f67e6411fb8338664372c7bc5e8f6cbeda73f4.zip
Made sure to clean up after all of the dangling pointers in the
Setup_Video tab. Signed-off-by: Ira Rice <irarice@gmail.com>
-rw-r--r--src/gui/setup_video.cpp45
-rw-r--r--src/gui/setup_video.h7
2 files changed, 46 insertions, 6 deletions
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index 855a13fd..7c891f44 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -143,12 +143,12 @@ Setup_Video::Setup_Video():
ScrollArea *scrollArea = new ScrollArea(mModeList);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- gcn::Label *speechLabel = new gcn::Label(_("Overhead text"));
- gcn::Label *alphaLabel = new gcn::Label(_("Gui opacity"));
- gcn::Label *scrollRadiusLabel = new gcn::Label(_("Scroll radius"));
- gcn::Label *scrollLazinessLabel = new gcn::Label(_("Scroll laziness"));
- gcn::Label *overlayDetailLabel = new gcn::Label(_("Ambient FX"));
- gcn::Label *particleDetailLabel = new gcn::Label(_("Particle Detail"));
+ speechLabel = new gcn::Label(_("Overhead text"));
+ alphaLabel = new gcn::Label(_("Gui opacity"));
+ scrollRadiusLabel = new gcn::Label(_("Scroll radius"));
+ scrollLazinessLabel = new gcn::Label(_("Scroll laziness"));
+ overlayDetailLabel = new gcn::Label(_("Ambient FX"));
+ particleDetailLabel = new gcn::Label(_("Particle Detail"));
mModeList->setEnabled(true);
#ifndef USE_OPENGL
@@ -295,6 +295,39 @@ Setup_Video::Setup_Video():
Setup_Video::~Setup_Video()
{
delete mModeListModel;
+
+ delete speechLabel;
+ delete alphaLabel;
+ delete scrollRadiusLabel;
+ delete scrollLazinessLabel;
+ delete overlayDetailLabel;
+ delete particleDetailLabel;
+
+ delete mModeList;
+ delete mFsCheckBox;
+ delete mOpenGLCheckBox;
+ delete mCustomCursorCheckBox;
+ delete mParticleEffectsCheckBox;
+ delete mNameCheckBox;
+
+ delete mSpeechSlider;
+ delete mSpeechLabel;
+ delete mAlphaSlider;
+ delete mFpsCheckBox;
+ delete mFpsSlider;
+ delete mFpsField;
+
+ delete mScrollLazinessSlider;
+ delete mScrollLazinessField;
+
+ delete mScrollRadiusSlider;
+ delete mScrollRadiusField;
+
+ delete mOverlayDetailSlider;
+ delete mOverlayDetailField;
+
+ delete mParticleDetailSlider;
+ delete mParticleDetailField;
}
void Setup_Video::apply()
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 8230569a..13735e0f 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -59,6 +59,13 @@ class Setup_Video : public SetupTab, public gcn::ActionListener,
class ModeListModel *mModeListModel;
+ gcn::Label *speechLabel;
+ gcn::Label *alphaLabel;
+ gcn::Label *scrollRadiusLabel;
+ gcn::Label *scrollLazinessLabel;
+ gcn::Label *overlayDetailLabel;
+ gcn::Label *particleDetailLabel;
+
gcn::ListBox *mModeList;
gcn::CheckBox *mFsCheckBox;
gcn::CheckBox *mOpenGLCheckBox;