• 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: when should my NSWindowController be released?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when should my NSWindowController be released?


  • Subject: Re: when should my NSWindowController be released?
  • From: Markus Spoettl <email@hidden>
  • Date: Fri, 12 Sep 2008 23:53:47 -0700

On Sep 12, 2008, at 8:44 PM, Michael Ash wrote:
The NSDocument and any/all associated NSWindowControllers should be
closed and then deallocated when the document itself is closed. If
your window controllers aren't being deallocated then you have a
memory management bug somewhere.


I have observed the following in my application:

When the document is closed while the application keeps running, my document, window controller and dependent windows get deallocated as expected.

However, when the document closes while during application termination, the document and window controller get deallocated, but the document window are not (as a result lots of other things don't get deallocated).

The fact that the document and all it's dependent structures get deallocated in the first case tells me that my memory management is working correctly.

I have - maybe incorrectly - come to the conclusion that the system/ Cocoa retains windows and doesn't release them during app shutdown. Am I mistaken?

Markus
--
__________________________________________
Markus Spoettl

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: when should my NSWindowController be released?
      • From: Charles Steinman <email@hidden>
References: 
 >when should my NSWindowController be released? (From: Paul Archibald <email@hidden>)
 >Re: when should my NSWindowController be released? (From: Ken Thomases <email@hidden>)
 >Re: when should my NSWindowController be released? (From: Jamie Hardt <email@hidden>)
 >Re: when should my NSWindowController be released? (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: EPS
  • Next by Date: Re: when should my NSWindowController be released?
  • Previous by thread: Re: when should my NSWindowController be released?
  • Next by thread: Re: when should my NSWindowController be released?
  • Index(es):
    • Date
    • Thread