• 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: NSArray problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArray problems


  • Subject: Re: NSArray problems
  • From: Andy Lee <email@hidden>
  • Date: Sun, 27 Jul 2008 23:04:54 -0400

On Jul 27, 2008, at 10:52 PM, Daniel Richman wrote:
numbers = [allNumbers componentsSeparatedByString:@"\t"];

You don't own the return value from -componentsSeparatedByString:, so you must retain it if you want it to stick around.


the contents of the array have become other, non string things.

When things become other weird things, that's usually a sign that you forgot to retain something, and so memory got deallocated and reallocated for a different object.


--Andy


_______________________________________________

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: 
 >NSArray problems (From: Daniel Richman <email@hidden>)

  • Prev by Date: Re: NSDocument and window ivar
  • Next by Date: Re: Handle errors within NSURLConnection
  • Previous by thread: Re: NSArray problems
  • Next by thread: NSTextView + other NSView in NSScrollView?
  • Index(es):
    • Date
    • Thread