Re: EXC_BAD_ACCESS help
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