NSTimers and document based app
NSTimers and document based app
- Subject: NSTimers and document based app
- From: Ettore Pasquini <email@hidden>
- Date: Tue, 7 Dec 2004 18:28:24 -0800
I'm experiencing a weird problem with a document based app. The
application creates and starts NSTimers, one for each document. For
the purpose of the app, when a document is closed I still need "its"
timer. Therefore, I stored the timers in the AppController, so they are
completely separated and NOT retained by the documents. (Each doc may
eventually access its timer with an Id and an accessor method.)
The issue is that when I close a document, the document is not released
if the timer is still running (and therefore leaks), but if I first
invalidate the timer, the document is released. Also, by debugging the
code I observed that during the [nstimer invalidate] call the
retainCount for the document is misteriously decremented.
Any insight greatly appreciated.
-ep
_______________________________________________
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