Re: Helping Arc with: "PerformSelector may cause a leak because its selector is unknown"
Re: Helping Arc with: "PerformSelector may cause a leak because its selector is unknown"
- Subject: Re: Helping Arc with: "PerformSelector may cause a leak because its selector is unknown"
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Tue, 22 Oct 2013 14:27:35 +0700
On 22 Oct 2013, at 13:48, Gideon King <email@hidden> wrote:
> You can tell it to ignore the warning like this:
>
> #pragma clang diagnostic push
> #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
> NSNumber *status = [ self performSelector: aSelector withObject: a withObject: b ];
> #pragma clang diagnostic pop
>
> Hope that helps.
This certainly helps: at least I get a clean compile.
But telling the compiler about the type of selector to expect would be even better.
Can this be done?
Kind regards,
Gerriet.
>
> On 22/10/2013, at 4:37 PM, "Gerriet M. Denkmann" <email@hidden> wrote:
>
>>
>> Xcode 5.0 complains: "PerformSelector may cause a leak because its selector is unknown"
>>
>> Is there a way to tell the compiler that "aSelector" returns an object which does NOT need to get released by the caller ?
>> I saw something like "__autoreleasing", but don't know how to apply this in my case.
>>
>> Gerriet.
>>
>
_______________________________________________
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