You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2018/01/11 12:27:57 UTC

incubator-weex git commit: * [iOS] destroy pthread mutex

Repository: incubator-weex
Updated Branches:
  refs/heads/master bfa6dbd7c -> da62c5384


* [iOS] destroy pthread mutex


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/da62c538
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/da62c538
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/da62c538

Branch: refs/heads/master
Commit: da62c53845af292d3afac01ac760f9a73c2f60bf
Parents: bfa6dbd
Author: acton393 <zh...@gmail.com>
Authored: Thu Jan 11 20:27:39 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Jan 11 20:27:39 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableArray.m     | 6 ++----
 .../WeexSDK/Sources/Utility/WXThreadSafeMutableDictionary.m    | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/da62c538/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableArray.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableArray.m b/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableArray.m
index 62a6898..3a26275 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableArray.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableArray.m
@@ -289,10 +289,8 @@
     if (_queue) {
         _queue = NULL;
     }
-    if ([WXUtility threadSafeCollectionUsingLock]) {
-        pthread_mutex_destroy(&_safeThreadArrayMutex);
-        pthread_mutexattr_destroy(&_safeThreadArrayMutexAttr);
-    }
+    pthread_mutex_destroy(&_safeThreadArrayMutex);
+    pthread_mutexattr_destroy(&_safeThreadArrayMutexAttr);
 }
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/da62c538/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableDictionary.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableDictionary.m b/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableDictionary.m
index 4086bf4..fb4185e 100644
--- a/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableDictionary.m
+++ b/ios/sdk/WeexSDK/Sources/Utility/WXThreadSafeMutableDictionary.m
@@ -245,10 +245,8 @@
 
 - (void)dealloc
 {
-    if ([WXUtility threadSafeCollectionUsingLock]) {
-        pthread_mutex_destroy(&_safeThreadDictionaryMutex);
-        pthread_mutexattr_destroy(&_safeThreadDictionaryMutexAttr);
-    }
+    pthread_mutex_destroy(&_safeThreadDictionaryMutex);
+    pthread_mutexattr_destroy(&_safeThreadDictionaryMutexAttr);
 }
 
 @end