Re: dispatch queue as property
Re: dispatch queue as property
- Subject: Re: dispatch queue as property
- From: Jamie Pinkham <email@hidden>
- Date: Wed, 02 Nov 2011 08:33:21 -0400
Automatic property generation doesn't support the semantics you need.
You are correct that you have to use the dispatch_retain() and dispatch_release() functions; you just have write your setter and getter manually, using those functions.
-Jamie
Sent from my iPhone
On Nov 2, 2011, at 7:52 AM, Andreas Grosam <email@hidden> wrote:
> I want to set a dispatch queue via a property. How should I set the property's attributes when the queue is retained/released via functions dispatch_retain() and dispatch_release()?
>
> Currently, since using "retain" is only possible for objects, I just declare it like follows:
>
> @property (nonatomic) dispatch_queue_t dispatchQueue;
>
>
> But here, the retain/release semantic isn't exposed. Any better ideas?
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden