summaryrefslogtreecommitdiff
path: root/src
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
commitd6f2a65323d5fe4e0a83e305ac203eb5f3af4790 (patch)
tree7074b521520f348d12585b3bb9a799aa58abe737 /src
parent0564d52d990bda72c6e63d16ce20e6f9572abcf1 (diff)
downloadopenttd-d6f2a65323d5fe4e0a83e305ac203eb5f3af4790.tar.xz
(svn r15663) -Fix: growing of vsize as (some) threads weren't properly released.
Diffstat (limited to 'src')
-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;
+ }
}
};