From b4ad36cc51174f9207907f6313f35729dd110e97 Mon Sep 17 00:00:00 2001 From: rude Date: Wed, 24 Feb 2010 20:43:05 +0100 Subject: [PATCH] Objects extending love::Object need to have virtual destructors. They are garbage collected as love::Object. --- src/modules/thread/sdl/Thread.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/thread/sdl/Thread.h b/src/modules/thread/sdl/Thread.h index 81f665026..1fe4355a3 100644 --- a/src/modules/thread/sdl/Thread.h +++ b/src/modules/thread/sdl/Thread.h @@ -58,7 +58,7 @@ namespace sdl ThreadVariant(const char *string); ThreadVariant(void *userdata); ThreadVariant(Type udatatype, void *userdata); - ~ThreadVariant(); + virtual ~ThreadVariant(); ThreadVariantType type; union { @@ -103,7 +103,7 @@ namespace sdl public: Thread(love::thread::ThreadModule *module, std::string name, love::Data *data); Thread(love::thread::ThreadModule *module, std::string name); - ~Thread(); + virtual ~Thread(); void start(); void kill(); void wait(); @@ -125,7 +125,7 @@ namespace sdl public: ThreadModule(); - ~ThreadModule(); + virtual ~ThreadModule(); Thread *newThread(std::string name, love::Data *data); Thread **getThreads(); Thread *getThread(std::string name);