Use dispatch_release() on all dispatch objects in non-ARC code. Jamie ________________________________________ From: darwin-kernel-bounces+eimaj79=hotmail.com@lists.apple.com <darwin-kernel-bounces+eimaj79=hotmail.com@lists.apple.com> on behalf of Jerry Krinock <jerry@ieee.org> Sent: Sunday, April 3, 2016 6:28 AM To: darwin-kernel@lists.apple.com Subject: Dispose of dispatch_semaphore? 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/eimaj79%40hotmail.com This email sent to eimaj79@hotmail.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com