aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ben Gotow <bengotow@gmail.com>2017-12-03 21:15:59 -0800
committerGravatar HoĆ  V. DINH <dinh.viet.hoa@gmail.com>2017-12-03 21:15:59 -0800
commitfa08441233e3acb4931be461e32fef00ac671606 (patch)
tree59194b35f961956f0d8dd6f7e2970b637fe5bf9e
parent38df63870b1024ec972afeb6c13cac8a2f6937a4 (diff)
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.
-rw-r--r--src/core/basetypes/MCObject.cpp3
1 files changed, 3 insertions, 0 deletions
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()