Make sure mutexes are being freed accordingly

This commit is contained in:
nxtstep 2018-11-16 17:26:52 +01:00
parent f08de81805
commit 4e744043a3
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)
}
}