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

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


References: 
 >NSMutableSet funny (From: Matthew Whillock <email@hidden>)

  • Prev by Date: Re: NSDateFormatter
  • Next by Date: Re: Probably dumb question...
  • Previous by thread: NSMutableSet funny
  • Next by thread: binding and altered object
  • Index(es):
    • Date
    • Thread