summaryrefslogtreecommitdiff
path: root/src/threadengine.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-25 11:37:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-25 11:37:06 +0000
commit9b6337bec9b8adfcb1746c76be752334869ac997 (patch)
tree4abd1175f5d47205166e7827a6ce81c99037df66 /src/threadengine.cpp
parenta4e0a1127a7db3e08399bfb1efffb14588323743 (diff)
start of fix for bug #805
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11260 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/threadengine.cpp')
-rw-r--r--src/threadengine.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/threadengine.cpp b/src/threadengine.cpp
index e7a316282..faa020234 100644
--- a/src/threadengine.cpp
+++ b/src/threadengine.cpp
@@ -20,4 +20,14 @@
#include "inspircd.h"
#include "threadengine.h"
-
+/** If this thread has a Creator set, call it to
+ * free the thread
+ */
+virtual ~Thread::Thread()
+{
+ if (state)
+ {
+ state->FreeThread(this);
+ delete state;
+ }
+}