Dispose of dispatch_semaphore?
Dispose of dispatch_semaphore?
- Subject: Dispose of dispatch_semaphore?
- From: Jerry Krinock <email@hidden>
- Date: Sun, 03 Apr 2016 06:28:36 -0700
After replacing an old NSConditionLock with dispatch_semaphore_create(), dispatch_semaphore_wait(), and dispatch_semaphore_signal(), I was amazed at how easy this was. But maybe too easy. Does this semaphore not need to be disposed of or released in some way after I’m done with it? My old project is non-ARC.
In the open-source code, there is a _dispatch_semaphore_dispose() but this is a private API, and seems to be invoked as a result of its membership in a magic struct of some kind. Does all of this stuff “just work” and I shouldn’t worry about it?
Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden