Re: Intercepting retain/release of object

2008-03-24 Thread Jack Repenning
On Mar 23, 2008, at 9:50 PM, Stuart Malin wrote: For neary all of my code, I have nice, straightforward retain- release pathways. The one that had been giving me trouble is an oddball: I have a factory class that generates an instance. That instance is bounced around handlers of a state

Re: Intercepting retain/release of object

2008-03-23 Thread Jack Repenning
On Mar 21, 2008, at 2:36 PM, Sherm Pendley wrote: In short, the fact that you need a means to track down your -retain and -release calls is indicative of a deeper problem. Examining the retain count will not only fail to solve that problem, but will also obfuscate the issue even further.

Re: Intercepting retain/release of object

2008-03-21 Thread Sherm Pendley
On Fri, Mar 21, 2008 at 4:32 PM, Stuart Malin [EMAIL PROTECTED] wrote: Thanks for all the comments. I had started this thread not because I wanted to peak under the hood, or employ non-canonical techniques, but because I had an instance become free before its time. I had though that

Re: Intercepting retain/release of object

2008-03-21 Thread Erik Buck
When dealing with an over release problem, just turn on NSZombieEnabled, and you will quickly find the problem. If you restrict retains and releases to accessors, you won't have very many places you need to look. ___ Cocoa-dev mailing list

Intercepting retain/release of object

2008-03-19 Thread Stuart Malin
I am having some trouble in an app with an object and its retain counts, so I added methods to intercept -retain and -release on my affected object so I could set breakpoints to observe the value. But doing so causes some really odd behavior, such as the object receiving extra retain

Re: Intercepting retain/release of object

2008-03-19 Thread Jonathan del Strother
On Wed, Mar 19, 2008 at 5:54 PM, Stuart Malin [EMAIL PROTECTED] wrote: I am having some trouble in an app with an object and its retain counts, so I added methods to intercept -retain and -release on my affected object so I could set breakpoints to observe the value. But doing so causes

Re: Intercepting retain/release of object

2008-03-19 Thread Nick Zitzmann
On Mar 19, 2008, at 11:54 AM, Stuart Malin wrote: I am having some trouble in an app with an object and its retain counts, so I added methods to intercept -retain and -release on my affected object so I could set breakpoints to observe the value. But doing so causes some really odd

Re: Intercepting retain/release of object

2008-03-19 Thread Rob Napier
When you say really odd behavior can you confirm that you mean actually different from normal behavior versus not the behavior your were expecting? It does not surprise me that there may be a retain involved during the removal of an object from an array. I would expect it in order to manage KVO

Re: Intercepting retain/release of object

2008-03-19 Thread Stuart Malin
Thanks all! On Mar 19, 2008, at 8:04 AM, Jonathan del Strother wrote: -(id)retain needs to return itself, not void. On Mar 19, 2008, at 8:09 AM, Pierre Molinaro wrote: The retain method should return self object : So it should. Changing that fixed the problem. Hmmm... the compiler never