Search code examples
objective-cretaindealloc

objective-c object not getting dealloc:ed


I've got an issue with an object not being deallocated in objective-c. I'm pretty certain this is because it is being retained somewhere, but I don't know where (checking retainCount where it ought to be 0 returns a 1). I've gone through my code many times but fail to see what's retaining it that I don't release. Might even be a bug in the frameworks I'm using.

How would you deal with something like this? I thought maybe you could search through the memory and see what's pointing to this object, making it considerably easier to figure out why it is like this, but I'm not quite sure how to achieve that. Maybe another solution?


Solution

  • Have you tried Instruments?