I am working on iOS Core Audio following the suggestion from this post: Core Audio render thread and thread signalling.
In the updated answer, which uses dispatch_semaphore_t
, I understand that I don't need to call dispatch_release
when ARC is enabled after reading this post: Does ARC support dispatch queues?.
However, in the original answer when semaphore_t
is used (see below code snippets), I cannot find reference for whether I need to destroy the semaphore by calling semaphore_destroy
when ARC is enabled. Can someone please help?
semaphore_t mSemaphore;
kern_return_t result = semaphore_create(mach_task_self(), &mSemaphore, SYNC_POLICY_FIFO, 0);
// Do stuff with semaphore wait and signal ...
kern_return_t result = semaphore_destroy(mach_task_self(), mSemaphore);
Thank you in advance!