• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trouble with performSelector afterDelay
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with performSelector afterDelay


  • Subject: Re: Trouble with performSelector afterDelay
  • From: "James Trankelson" <email@hidden>
  • Date: Mon, 14 Jul 2008 18:59:18 -0400

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@hidden> 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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Trouble with performSelector afterDelay
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Trouble with performSelector afterDelay (From: "James Trankelson" <email@hidden>)
 >Re: Trouble with performSelector afterDelay (From: Jens Alfke <email@hidden>)
 >Re: Trouble with performSelector afterDelay (From: "James Trankelson" <email@hidden>)
 >Re: Trouble with performSelector afterDelay (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Creating and App menu from Scratch
  • Next by Date: Re: NSSlider and timers
  • Previous by thread: Re: Trouble with performSelector afterDelay
  • Next by thread: Re: Trouble with performSelector afterDelay
  • Index(es):
    • Date
    • Thread