• 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: Ian was here <email@hidden>
  • Date: Mon, 05 Mar 2012 17:21:17 -0800 (PST)

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@hidden>
To: Cocoa mailing list <email@hidden>
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@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


References: 
 >Releasing WSMethodInvocationInvoke() (From: Ian was here <email@hidden>)
 >Re: Releasing WSMethodInvocationInvoke() (From: Gus Mueller <email@hidden>)

  • Prev by Date: Re: How are views supposed to reload after being nillified by memory warnings?
  • Next by Date: Re: Unclear on -initWithBytesNoCopy:
  • Previous by thread: Re: Releasing WSMethodInvocationInvoke()
  • Next by thread: Re: Releasing WSMethodInvocationInvoke()
  • Index(es):
    • Date
    • Thread