• 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: Can't release a NSWindowController when a window close
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Can't release a NSWindowController when a window close
      • From: Luca Caviglione <email@hidden>
References: 
 >Can't release a NSWindowController when a window close (From: Luca Caviglione <email@hidden>)

  • Prev by Date: Can't release a NSWindowController when a window close
  • Next by Date: Re: Hidden System Preferences doesn't send didUnselect message
  • Previous by thread: Can't release a NSWindowController when a window close
  • Next by thread: Re: Can't release a NSWindowController when a window close
  • Index(es):
    • Date
    • Thread