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

Re: EXC_BAD_ACCESS help


  • Subject: Re: EXC_BAD_ACCESS help
  • From: Bill Bumgarner <email@hidden>
  • Date: Sat, 19 Jan 2008 22:26:42 -0800

On Jan 19, 2008, at 10:20 PM, William Zumwalt wrote:
I really think I understand that link, and the only reason I bring up the
retain count is because I know I'm not releasing it too early (cause I don't
release these objects for now).
What I'm afraid is happening is that it's being overwritten somehow and that
when I access the NSNumber object, I get the error. Or possibly something to
do with the threads that I don't understand, but I just don't see it.

I. Savant is correct in his negativity towards -retainCount. Many a time, I have wished that method went the way of the dodo in about '97 or so...


But, given that -retainCount "works" and -intValue does not, your assessment that something is munching on memory is quite likely correct.

Was the code in the original email quite literally a copy/paste -- i.e. was the invocation of -retainCount and -intValue that adjacent?

Have you tried debugging with NSZombieEnabled?

You mention threads -- NSValues are immutable and, thus, interaction with threads is quite typically along the lines of incorrectly managing retain/release as the object is transferred between threads.

b.bum

_______________________________________________

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: 
 >EXC_BAD_ACCESS help (From: "William Zumwalt" <email@hidden>)
 >Re: EXC_BAD_ACCESS help (From: "I. Savant" <email@hidden>)
 >Re: EXC_BAD_ACCESS help (From: "William Zumwalt" <email@hidden>)

  • Prev by Date: Re: EXC_BAD_ACCESS help
  • Next by Date: Re: Where should AppleScripts reside?
  • Previous by thread: Re: EXC_BAD_ACCESS help
  • Next by thread: Re: EXC_BAD_ACCESS help
  • Index(es):
    • Date
    • Thread