From fa08441233e3acb4931be461e32fef00ac671606 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Sun, 3 Dec 2017 21:15:59 -0800 Subject: On non-Apple systems, clean up MCObject locks (#1694) On Windows, Mailspring was leaking a huge number of event handles, which could cause it to eventually crash. Adding this line doesn't cause the code to crash and reduces the number of handles reported by Process Explorer. --- src/core/basetypes/MCObject.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/basetypes/MCObject.cpp b/src/core/basetypes/MCObject.cpp index 6f776ef6..c9d8d464 100644 --- a/src/core/basetypes/MCObject.cpp +++ b/src/core/basetypes/MCObject.cpp @@ -33,6 +33,9 @@ Object::Object() Object::~Object() { +#ifndef __APPLE__ + pthread_mutex_destroy(&mLock); +#endif } void Object::init() -- cgit v1.2.3