Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXC_BAD_ACCESS help



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.