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 warned me that I had a mismatched return type (isn't return type a part of a method's signature?).

I know the release could have freed the object, and so my call to retainCount could gen an exception... tolerable in my context of debugging.


On Mar 19, 2008, at 8:12 AM, Rob Napier wrote:
When you say "really odd behavior" can you confirm that you mean
"actually different from normal behavior" versus "not the behavior
your were expecting?"

The behavior was different than normal -- my code made the retain count value wrong. It is now correct.

 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 notifications which may fire after
the object is removed but before it is deallocated.

Yes - that is what I was seeing: a retain upon removing -- which confused me.




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to