Merge pull request #2413 from nxtstep/fix/mutex-free

[Swift-runtime] Make sure mutexes are being freed accordingly
This commit is contained in:
Terence Parr 2018-11-18 09:13:57 -08:00 committed by GitHub
commit 0308999f06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -35,4 +35,8 @@ class Mutex {
return try closure()
}
deinit {
// free the mutex resource
pthread_mutex_destroy(&mutex)
}
}