Thanks, Ken,

I had a suspicion that's what was going on there, so I just added a
few extra [Worker retain] messages before I sent the message to be
handled. Still, the object gets released.

I have yet to find an explanation about any other reasons an object
might get released even after sending it several extraneous retain
messages.

-jt


On Mon, Jul 14, 2008 at 6:40 PM, Ken Thomases <[EMAIL PROTECTED]> wrote:
> On Jul 14, 2008, at 5:25 PM, James Trankelson wrote:
>
>> The funny thing about my Worker class is that it's a singleton,
>> implementing the following method:
>>
>> - (unsigned)retainCount
>> {
>>    return UINT_MAX;  //Never release
>> }
>>
>> Are there other ways objects can get released if not by retainCount?
>
> The implementation of NSObject's -retain, -release, and -retainCount are
> private.  However, I've always thought that -retainCount was a means for
> outsiders to query what's going on -- it does not _control_ what happens, it
> just _reveals_ something about what happens.  That's my guess, anyway.
>
> So, I would not expect that overriding -retainCount would be a means to
> "neutralize" -release.  And, from what you're seeing, indeed it is not.
>
> Cheers,
> Ken
>
_______________________________________________

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