Re: NSMutableSet funny
Re: NSMutableSet funny
- Subject: Re: NSMutableSet funny
- From: Andy Lee <email@hidden>
- Date: Mon, 1 Aug 2005 14:07:44 -0400
On Aug 1, 2005, at 9:55 AM, Matthew Whillock wrote:
Hi list,
My program puts some custom objects into a mutable set using [aSet
addObject:anObject]; and when I inspect the set afterwards there
are the objects I add and at least one instance of an NSCFTimer in
there. I have no idea where that comes from; I'm not knowingly
using NSTimers anywhere.
Has anybody come across this strangeness with NSMutableSet at all?
It sounds like one of the objects you add to your set is prematurely
deallocated due to one too many releases. So you have a dangling
pointer reference. The deallocated memory gets filled with some
other random object, in this case an NSCFTimer, and thereafter the
pointer points to that object rather than your original one.
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden