On Thu, Mar 13, 2008 at 9:37 PM, Brian Greenstone <[EMAIL PROTECTED]> wrote:
> I'm hoping someone can shed some light on this for me. I'm getting
> some unusual retainCount values from the following code:
>
> NSTimer *theTimer;
>
> theTimer = [NSTimer scheduledTimerWithTimeInterva
I would expect, at "A", for the timer to have any retain count of at
least one, and an equal number of releases pending in your
autorelease pool. Maybe the run loop's autorelease pool is getting
popped or drained as a side effect of adding the timer or something.
If you really want to fig
On 14/03/2008, at 12:37 PM, Brian Greenstone wrote:
But that shouldn't be, right? Shouldn't the retainCount of theTimer
be 1 after scheduledTimerWithTimeInterval? Then shouldn't it be
bumped up to 2 after adding the timer to the Run Loop? It appears
that the retain count is starting at
I guess this just proves the age-old rule, "never rely on the return
value of -retainCount to make sense." :)
Seriously, this does seem weird, but -retainCount seems to have a mind
of its own. Just have faith in the memory management rules.
Brian Greenstone wrote:
I'm hoping someone can shed s
I'm hoping someone can shed some light on this for me. I'm getting
some unusual retainCount values from the following code:
NSTimer *theTimer;
theTimer = [NSTimer scheduledTimerWithTimeInterval:1.0
target: