Fixed a couple more leaks

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9886 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2011-09-22 18:24:28 +00:00
parent 07afe4c87b
commit 978bb5466b
9 changed files with 37 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
#ifdef _IRR_COMPILE_WITH_GUI_
#include <cassert>
#include "IGUISpriteBank.h"
#include "utils/leak_check.hpp"
namespace irr
{
@@ -29,6 +30,8 @@ class STKModifiedSpriteBank : public IGUISpriteBank
{
public:
LEAK_CHECK()
STKModifiedSpriteBank(IGUIEnvironment* env);
virtual ~STKModifiedSpriteBank();

View File

@@ -24,6 +24,7 @@
#include <string>
#include "guiengine/engine.hpp"
#include "guiengine/screen.hpp"
#include "utils/leak_check.hpp"
/**
* \ingroup guiengine
@@ -66,6 +67,8 @@ namespace GUIEngine
public:
LEAK_CHECK()
/** inits an AbstractStateManager is MENU state */
AbstractStateManager();

View File

@@ -308,6 +308,12 @@ EventHandler* EventHandler::get()
return event_handler_singleton;
}
void EventHandler::free()
{
delete event_handler_singleton;
event_handler_singleton = NULL;
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------

View File

@@ -21,6 +21,7 @@
#include <vector2d.h>
#include <IEventReceiver.h>
#include "input/input.hpp"
#include "utils/leak_check.hpp"
/**
* \ingroup guiengine
@@ -70,6 +71,9 @@ namespace GUIEngine
irr::core::vector2di m_mouse_pos;
public:
LEAK_CHECK()
EventHandler();
~EventHandler();
@@ -92,6 +96,7 @@ namespace GUIEngine
/** singleton access */
static EventHandler* get();
static void free();
};
}

View File

@@ -15,6 +15,8 @@
#include "irrArray.h"
#include <map>
#include "utils/leak_check.hpp"
namespace irr
{
@@ -65,6 +67,8 @@ class ScalableFont : public IGUIFontBitmap
public:
LEAK_CHECK()
bool m_black_border;
ScalableFont* m_fallback_font;

View File

@@ -57,6 +57,7 @@
#include "graphics/material_manager.hpp"
#include "graphics/referee.hpp"
#include "guiengine/engine.hpp"
#include "guiengine/event_handler.hpp"
#include "input/input_manager.hpp"
#include "input/device_manager.hpp"
#include "io/file_manager.hpp"
@@ -925,6 +926,9 @@ void cleanSuperTuxKart()
if(translations) delete translations;
if(file_manager) delete file_manager;
if(irr_driver) delete irr_driver;
StateManager::free();
GUIEngine::EventHandler::free();
} // cleanSuperTuxKart
//=============================================================================

View File

@@ -21,6 +21,7 @@
#include "config/player.hpp"
#include "guiengine/modaldialog.hpp"
#include "utils/leak_check.hpp"
/**
* \brief Generic dialog to ask the user to confirm something, or to show a simple message box
@@ -37,6 +38,9 @@ public:
class IConfirmDialogListener
{
public:
LEAK_CHECK()
IConfirmDialogListener() {}
virtual ~IConfirmDialogListener() {}

View File

@@ -43,6 +43,13 @@ StateManager* StateManager::get()
return state_manager_singleton;
} // get
void StateManager::free()
{
delete state_manager_singleton;
state_manager_singleton = NULL;
}
// ============================================================================
#if 0

View File

@@ -181,6 +181,7 @@ public:
// singleton
static StateManager* get();
static void free();
private:
/**