Skip to content

Commit 5c603dd

Browse files
committed
Merge tag '3.3.1' into swift/2.0
2 parents c360a1e + 11c0370 commit 5c603dd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

SwiftTask.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'SwiftTask'
3-
s.version = '3.3.0'
3+
s.version = '3.3.1'
44
s.license = { :type => 'MIT' }
55
s.homepage = 'https://github.com/ReactKit/SwiftTask'
66
s.authors = { 'Yasuhiro Inami' => '[email protected]' }

SwiftTask/_RecursiveLock.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ internal final class _RecursiveLock
1515

1616
internal init()
1717
{
18-
self.mutex = UnsafeMutablePointer.alloc(sizeof(pthread_mutex_t))
19-
self.attribute = UnsafeMutablePointer.alloc(sizeof(pthread_mutexattr_t))
18+
self.mutex = UnsafeMutablePointer<pthread_mutex_t>.alloc(1)
19+
self.attribute = UnsafeMutablePointer<pthread_mutexattr_t>.alloc(1)
2020

2121
pthread_mutexattr_init(self.attribute)
2222
pthread_mutexattr_settype(self.attribute, PTHREAD_MUTEX_RECURSIVE)
@@ -27,6 +27,9 @@ internal final class _RecursiveLock
2727
{
2828
pthread_mutexattr_destroy(self.attribute)
2929
pthread_mutex_destroy(self.mutex)
30+
31+
self.attribute.dealloc(1)
32+
self.mutex.dealloc(1)
3033
}
3134

3235
internal func lock()
@@ -38,4 +41,4 @@ internal final class _RecursiveLock
3841
{
3942
pthread_mutex_unlock(self.mutex)
4043
}
41-
}
44+
}

0 commit comments

Comments
 (0)