- more memory cleanup and thread cleanup (found using valgrind)

This commit is contained in:
Mark Vejvoda
2011-09-28 15:32:57 +00:00
parent a3bf4bfe32
commit 43ed4553ea
7 changed files with 63 additions and 14 deletions

View File

@@ -23,6 +23,7 @@
#endif
//#include "util.h"
#include <vector>
#include "leak_dumper.h"
// =====================================================
@@ -36,7 +37,9 @@ using namespace Shared::PlatformCommon;
namespace Shared { namespace Platform {
class Thread{
class Mutex;
class Thread {
public:
enum Priority {
pIdle = 0,
@@ -49,10 +52,15 @@ public:
private:
SDL_Thread* thread;
static Mutex mutexthreadList;
static std::vector<Thread *> threadList;
public:
Thread();
virtual ~Thread();
static std::vector<Thread *> getThreadList();
void start();
virtual void execute()=0;
void setPriority(Thread::Priority threadPriority);