summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-10 11:12:03 +0000
committerrubidium <rubidium@openttd.org>2009-03-10 11:12:03 +0000
commite48142c4dbf2b62f59ca64e864c4c195990d342d (patch)
tree7074b521520f348d12585b3bb9a799aa58abe737
parent88e641282c606b680a1efa6cd6082e78f99e6df2 (diff)
downloadopenttd-e48142c4dbf2b62f59ca64e864c4c195990d342d.tar.xz
(svn r15663) -Fix: growing of vsize as (some) threads weren't properly released.
-rw-r--r--src/thread_pthread.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/thread_pthread.cpp b/src/thread_pthread.cpp
index bcfaf8c85..3f55750a1 100644
--- a/src/thread_pthread.cpp
+++ b/src/thread_pthread.cpp
@@ -68,7 +68,10 @@ private:
NOT_REACHED();
}
- if (self_destruct) delete this;
+ if (self_destruct) {
+ pthread_detach(pthread_self());
+ delete this;
+ }
}
};