From the compiler point of view, the 'retain' semantic does not mean anything
for an arbitrary type like dispatch queue.
So indicating the semantic to the compiler is pointless.
Now, if you want to expose the semantic to the developers that use this class,
a simple comment is probably enough.
Andreas,
Also, in the modern runtime, you'll need to add the @synthesize to the
implementation file as well, if you don't declare the backing ivar in the
header.
Thanks,
Jamie
On Nov 2, 2011, at 10:51 AM, Jamie Pinkham wrote:
> Andreas,
>
> It most certainly indicates a semantic. That is,
Andreas,
It most certainly indicates a semantic. That is, the generated property
accessors and getters will retain the object versus, copying or assigning the
object. In this case, the semantic you are trying to enforce isn't possible
for the type you are trying to enforce it on. The error y
On Nov 2, 2011, at 1:33 PM, Jamie Pinkham wrote:
> 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 functi
Bruno,
> @property (nonatomic, retain) dispatch_queue_t *dispatchQueue;
Let's assume for a second that this worked. Since dispatch_queue_t is already
typedef'd as a pointer "typedef struct dispatch_queue_s *dispatch_queue_t;".
You've declared the property as a pointer to a pointer, which mea
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 A
Hi Andreas.
I assuming that you aren't using ARC, right?
Be aware that the property declaration that you send doesn't retain anything.
The declaration should by:
@property (nonatomic, retain) dispatch_queue_t *dispatchQueue;
On Nov 2, 2011, at 9:52 AM, Andreas Grosam wrote:
> I want to set a d