diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/GameView.cpp | 29 | ||||
| -rw-r--r-- | src/game/GameView.h | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index df755f0..352d9e5 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -496,6 +496,35 @@ GameView::GameView(): renderModePresets[9].ColourMode = COLOUR_GRAD; } +GameView::~GameView() +{ + delete[] renderModePresets; + + if(!colourRSlider->GetParentWindow()) + delete colourRSlider; + + if(!colourGSlider->GetParentWindow()) + delete colourGSlider; + + if(!colourBSlider->GetParentWindow()) + delete colourBSlider; + + if(!colourASlider->GetParentWindow()) + delete colourASlider; + + if(!colourRValue->GetParentWindow()) + delete colourRValue; + + if(!colourGValue->GetParentWindow()) + delete colourGValue; + + if(!colourBValue->GetParentWindow()) + delete colourBValue; + + if(!colourAValue->GetParentWindow()) + delete colourAValue; +} + class GameView::MenuAction: public ui::ButtonAction { GameView * v; diff --git a/src/game/GameView.h b/src/game/GameView.h index efb4895..de84e1e 100644 --- a/src/game/GameView.h +++ b/src/game/GameView.h @@ -119,6 +119,7 @@ private: void disableAltBehaviour(); public: GameView(); + virtual ~GameView(); //Breaks MVC, but any other way is going to be more of a mess. ui::Point GetMousePosition(); |
