mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 10:54:01 +02:00
- more memory cleanup and thread cleanup (found using valgrind)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user