allocator with leak detecting capabilities

This commit is contained in:
Eduardo Bart
2011-07-12 16:27:37 -03:00
parent 9058a2898d
commit 3f0a0cb9de
7 changed files with 409 additions and 1 deletions

View File

@@ -28,6 +28,15 @@
Dispatcher g_dispatcher;
void Dispatcher::cleanup()
{
while(!m_scheduledTaskList.empty()) {
ScheduledTask *task = m_scheduledTaskList.top();
m_scheduledTaskList.pop();
delete task;
}
}
void Dispatcher::poll()
{
while(!m_taskList.empty()) {

View File

@@ -46,6 +46,9 @@ class Dispatcher
public:
Dispatcher() { }
/// Cleanup scheduled events
void cleanup();
/// Execute scheduled events
void poll();

View File

@@ -58,6 +58,7 @@ void Engine::terminate()
// terminate stuff
g_fonts.terminate();
g_graphics.terminate();
g_dispatcher.cleanup();
}
void Engine::poll()

View File

@@ -32,7 +32,7 @@ class AnimatedTexture : public Texture
{
public:
AnimatedTexture(int width, int height, int channels, int numFrames, uchar *framesPixels, int *framesDelay);
virtual ~AnimatedTexture();
~AnimatedTexture();
void enableBilinearFilter();
void processAnimation();