Re: NSTimer problem
Re: NSTimer problem
- Subject: Re: NSTimer problem
- From: John Draper <email@hidden>
- Date: Tue, 26 Apr 2005 22:22:41 -0700
Shawn Erickson wrote:
You are leaking timer instances because you retain it in your start
sending method but don't release it before blowing away your reference
to it.
Oh, right - I tried it both ways because I was afraid my Timer might
have gotten
de-allocated.
I suggest you simply don't retain it to begin with because the timer
instance will continue to exist as long as it is scheduled to fire and
for the life of the timer callback.
I actually had it that way, but it didn't fix the crash problem.
In other words if you drop the retain your invalidate message will be
sufficient.
Ok, done. Still don't work of course.
Not sure if that is your problem or not (no idea how many you could be
leaking) but I am confused by you saying your timer call back isn't
called yet you say it hits your break point when you put on on the
method?
It apparently crashes BEFORE the callback is being called. Somewhere
between the time I
sent the "scheduledTimerWithTimeInterval" message and when the callback
is supposed to
happen, which it never gets there. One would think the timer would
fire at least once,
so what could happen between the time I schedule the timer and it
calling me.
Anything seen in the console when running this application?
No - just my own "NSLogs" which I never see because I just don't get there.
Is there anyway I can get a list of allocated objects, kinda like
a "heap dump"?
in OS_X?
/Developer/Applications/Performance Tools/
Is this on the release, or on the ADC web site?
Consider ObjectAlloc.app, MallocDebug.app or even Shark.app.
I heard of these, but couldn't find out where I can get help in using them.
Are there any books out that cover this? There isn't much
documentation on
it.
A good thing to read...
<http://developer.apple.com/technotes/tn2004/tn2124.html>
Great - let me go and read this.....
Are you sending me mail in HTML? If you are, it could delay mail
getting to me.
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden