mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 12:04:55 +02:00
allocator with leak detecting capabilities
This commit is contained in:
@@ -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()) {
|
||||
|
@@ -46,6 +46,9 @@ class Dispatcher
|
||||
public:
|
||||
Dispatcher() { }
|
||||
|
||||
/// Cleanup scheduled events
|
||||
void cleanup();
|
||||
|
||||
/// Execute scheduled events
|
||||
void poll();
|
||||
|
||||
|
@@ -58,6 +58,7 @@ void Engine::terminate()
|
||||
// terminate stuff
|
||||
g_fonts.terminate();
|
||||
g_graphics.terminate();
|
||||
g_dispatcher.cleanup();
|
||||
}
|
||||
|
||||
void Engine::poll()
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user