• 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: Strange NSZombie occurring
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange NSZombie occurring


  • Subject: Re: Strange NSZombie occurring
  • From: Keary Suska <email@hidden>
  • Date: Sun, 07 Aug 2011 08:12:21 -0600

On Aug 7, 2011, at 7:10 AM, Scott Steinman wrote:

> I've got a zombie appearing in the weirdest place in my program.  Here is the relevant part of the code, using generic names for the methods:
>

First off, this isn;t a zombie issue. Zombies are objects that haven't died though they should have. Also called leaks.

Anyway, have you stepped through the code to make sure your array is being constructed properly at all?

> -(NSArray *)wordsInPhrase:(NSString *)thePhrase
> {
>   NSArray *wordArray;
>
>   [wordArray arrayByAddingObjectsFromArray:[phrase componentsSeparatedByString:@" "]];
>   numWords = [wordArray count];
>   return wordArray;
> }

> Now, the strangeness: words exists and is OK in setUpDisplay and startDisplay in that it contains the right words from the phrase.  But in changeWords:, somehow words is nil.  I'm at a loss to figure out how words could be released between start and changeWords:.  I'd appreciate some help.

How do you know this? based on your code this statement cannot be the case. Debugger is your friend...

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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: 
 >Strange NSZombie occurring (From: Scott Steinman <email@hidden>)

  • Prev by Date: Re: Drawing text like Lion's Mail
  • Next by Date: Re: Strange NSZombie occurring
  • Previous by thread: Strange NSZombie occurring
  • Next by thread: Re: Strange NSZombie occurring
  • Index(es):
    • Date
    • Thread