Objects extending love::Object need to have virtual destructors. They are garbage collected as love::Object.

This commit is contained in:
rude
2010-02-24 20:43:05 +01:00
parent 4ba513b679
commit b4ad36cc51
+3 -3
View File
@@ -58,7 +58,7 @@ namespace sdl
ThreadVariant(const char *string); ThreadVariant(const char *string);
ThreadVariant(void *userdata); ThreadVariant(void *userdata);
ThreadVariant(Type udatatype, void *userdata); ThreadVariant(Type udatatype, void *userdata);
~ThreadVariant(); virtual ~ThreadVariant();
ThreadVariantType type; ThreadVariantType type;
union union
{ {
@@ -103,7 +103,7 @@ namespace sdl
public: public:
Thread(love::thread::ThreadModule *module, std::string name, love::Data *data); Thread(love::thread::ThreadModule *module, std::string name, love::Data *data);
Thread(love::thread::ThreadModule *module, std::string name); Thread(love::thread::ThreadModule *module, std::string name);
~Thread(); virtual ~Thread();
void start(); void start();
void kill(); void kill();
void wait(); void wait();
@@ -125,7 +125,7 @@ namespace sdl
public: public:
ThreadModule(); ThreadModule();
~ThreadModule(); virtual ~ThreadModule();
Thread *newThread(std::string name, love::Data *data); Thread *newThread(std::string name, love::Data *data);
Thread **getThreads(); Thread **getThreads();
Thread *getThread(std::string name); Thread *getThread(std::string name);