Interesting. If that's the case, then the documentation for that method is correct, the caller is responsible for freeing the returned object. I will file a bug report.
Thanks. ----- Original Message ----- From: Gus Mueller <[email protected]> To: Cocoa mailing list <[email protected]> Cc: Sent: Monday, March 5, 2012 1:44 PM Subject: Re: Releasing WSMethodInvocationInvoke() On Mar 5, 2012, at 9:43 AM, Ian was here wrote: > I'm having an issue with the following line of code: > > NSDictionary*serviceResult = (NSDictionary *)WSMethodInvocationInvoke( > serviceCall ); > > [serviceResult release]; > > > According to the documentation and the WSMethodInvocation.h header file, it > is the caller's responsibility to release the returned serviceResult > dictionary. However, when I run my code through the analyzer in Xcode, it > says the serviceResult is released too many times, which would imply that it > is already autoreleased. I Googled this and found several examples where it > was not being released. If I comment-out the release code, the analyzer does > not complain. That's because it's missing a CF_RETURNS_RETAINED in the header for that method, which the analyzer needs to know what's going on. I'm not sure there's any way around this other than filing a bug and hoping Apple updates the headers in the next release. (Another example of this is SecTransformExecute in Securty.framework) -gus -- August 'Gus' Mueller Flying Meat Inc. http://flyingmeat.com/ _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/howlewere%40yahoo.com This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
