Re: Can't release a NSWindowController when a window close
Re: Can't release a NSWindowController when a window close
- Subject: Re: Can't release a NSWindowController when a window close
- From: j o a r <email@hidden>
- Date: Sun, 21 Jan 2007 20:51:48 +0100
On Jan 21, 2007, at 8:37 PM, Luca Caviglione wrote:
but it doesn't work. The controller is never released.
You mean "is never deallocated". It's really important to use the
correct terminology here.
The proper dealloc method is never called and hence I have also
timers continuing to fire
If your window controller is the target of a timer action it's no
wonder that it's not deallocated - as the timer retains its target.
Make sure to remove / invalidate all timers in your "-
windowWillClose:" and see what happens. I wouldn't be surprised if it
would solve your problem.
(but every time a timer is used, the proper invalidate-release are
implemented in the dealloc)
There is never any point in placing invalidation of timers in dealloc
for the reason I mentioned above.
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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