From 25154b62452926c5f558fc5f662168ddbdcd4422 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 14 Mar 2004 16:51:13 +0100 Subject: Fixed a memory leak in thread handling when using NPTL --- thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 974362c9..084a4295 100644 --- a/thread.c +++ b/thread.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: thread.c 1.30 2004/01/03 16:59:33 kls Exp $ + * $Id: thread.c 1.31 2004/03/14 16:48:30 kls Exp $ */ #include "thread.h" @@ -199,6 +199,7 @@ bool cThread::Start(void) running = true; parentTid = pthread_self(); pthread_create(&childTid, NULL, (void *(*) (void *))&StartThread, (void *)this); + pthread_detach(childTid); // auto-reap pthread_setschedparam(childTid, SCHED_RR, 0); usleep(10000); // otherwise calling Active() immediately after Start() causes a "pure virtual method called" error } -- cgit v1.2.3