I'm using a dispatch_queue which is accessed through a property of its owner, like this:
@property (nonatomic, assign) dispatch_queue_t queue;
Note the assign keyword. The queue is used throughout the objects life and thus owned by the object. I release the queue when the owning object is deallocated:
-(void)dealloc
{
dispatch_release(self.queue);
self.queue = nil;
}
How do I properly release this? Would using retain/release work?
What happens if there is stuff pending/running on the queue while calling release?