From 3749038b534a5948026624805adf1ee14ff4caa6 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 7 Aug 2015 20:37:11 +0200 Subject: [PATCH] MouseDownThread: let thread terminate cleanly. * Killing the thread leaks resources, and it will terminate cleanly and safely when the destructor exits anyway. * Fixes #12293. Thanks to ttcoder, jackburton and bonefish for investigating! * Does not fix #12286. Going to bissect now... --- headers/private/shared/Thread.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/headers/private/shared/Thread.h b/headers/private/shared/Thread.h index 79d062fbf7..7a47213dd9 100644 --- a/headers/private/shared/Thread.h +++ b/headers/private/shared/Thread.h @@ -365,11 +365,6 @@ MouseDownThread::MouseDownThread(View* view, template MouseDownThread::~MouseDownThread() { - if (fThreadID > 0) { - kill_thread(fThreadID); - // dead at this point - TRESPASS(); - } } @@ -393,7 +388,6 @@ MouseDownThread::TrackBinder(void* castToThis) MouseDownThread* self = static_cast(castToThis); self->Track(); // dead at this point - TRESPASS(); return B_OK; } @@ -427,9 +421,9 @@ MouseDownThread::Track() } delete this; - ASSERT(!"should not be here"); } + } // namespace BPrivate using namespace BPrivate;