0

I have an issue where i call a function on an object in one of my classes but at the time I call its holding a reference to a different object type and its a different type everytime, so i receive messages as so -[UIGestureRecognizerTarget stopConnection]: unrecognized selector sent to instance 0x6b23710 and the types are always UI type classes.

So this leads me to believe something is overriding memory somewhere and I can't track it down! It only happens when i delete a row from a UITableView, and thought that maybe this is deleting something before im ready for it too but nothing seems to have dealloced before im calling this function!

Is there anyway I can track when a value at memory address changes, or what would be the best way to track down what is changing the reference of my object in XCode??

Tristan
  • 3,845
  • 5
  • 35
  • 58

1 Answers1

1

This is a memory management issue. An object is being dealloced and another is being put in its place while you're still holding a reference to the old one. You can run the app with Zombies and see what object it is, but it's probably whatever object was being shown in your table view.

Community
  • 1
  • 1
Chuck
  • 234,037
  • 30
  • 302
  • 389
  • Hi Chuck, thank you very much for that advice it is a step in the right direction! The zombie stuff shows me a release happening that shouldn't be, but putting a breakpoint on the code where the release happens never gets hit but the error still happens! so I don't know if the zombie stuff is wrong or how a function can be called but the breakpoint missed? Either way it would still be a huge help to track the memory address if possible? – Tristan Jan 13 '11 at 22:30