• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Releasing WSMethodInvocationInvoke()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Releasing WSMethodInvocationInvoke()


  • Subject: Re: Releasing WSMethodInvocationInvoke()
  • From: Gus Mueller <email@hidden>
  • Date: Mon, 05 Mar 2012 13:44:24 -0800

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@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


  • Follow-Ups:
    • Re: Releasing WSMethodInvocationInvoke()
      • From: Sean McBride <email@hidden>
    • Re: Releasing WSMethodInvocationInvoke()
      • From: Ian was here <email@hidden>
References: 
 >Releasing WSMethodInvocationInvoke() (From: Ian was here <email@hidden>)

  • Prev by Date: Re: NSURLRequests and Firewalls
  • Next by Date: Re: Convert PDF CGContextRef to NSView for hi-res printing
  • Previous by thread: Releasing WSMethodInvocationInvoke()
  • Next by thread: Re: Releasing WSMethodInvocationInvoke()
  • Index(es):
    • Date
    • Thread