• 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: Xcode3.2 build and analyze warning for NSString allocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode3.2 build and analyze warning for NSString allocation


  • Subject: Re: Xcode3.2 build and analyze warning for NSString allocation
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 27 Sep 2009 09:02:06 -0700


On Sep 27, 2009, at 2:03 AM, Nick Rogers wrote:

1. Method returns an Objective-C object with a +1 retain count (owning reference).

It means exactly what it says. The string was created by -alloc, so you own a reference so it, so you need to call -autorelease on it before returning it.
No offense, but this is very basic Cocoa refcounting stuff, so it sounds like you should carefully read the memory management guidelines.


—Jens_______________________________________________

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: 
 >Xcode3.2 build and analyze warning for NSString allocation (From: Nick Rogers <email@hidden>)

  • Prev by Date: Re: NSURLConnection upload to iDisk works with iPhone OS 2.x but fails on 3.x
  • Next by Date: Best Design Advice
  • Previous by thread: Re: Xcode3.2 build and analyze warning for NSString allocation
  • Next by thread: Re: Xcode3.2 build and analyze warning for NSString allocation
  • Index(es):
    • Date
    • Thread