• 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: "Michael Ash" <email@hidden>
  • Date: Fri, 12 Sep 2008 23:44:28 -0400

On Fri, Sep 12, 2008 at 9:02 PM, Jamie Hardt <email@hidden> wrote:
> On Sep 12, 2008, at 5:53 PM, Ken Thomases wrote:
>
>> Cocoa doesn't bother doing a full release/dealloc of your application
>> object (and the things it owns) at application termination.  The principle
>> is that the OS is about to cleanup the whole process's address space in one
>> fell swoop, so there's no point in doing it piecemeal first.
>
>
> I think his question, and I've wondered about this too, is when do
> NSWindowControllers owned by an NSDcoument get deallocated?  In the past
> I've put breakpoints on [NSWindowController dealloc] and have open and
> closed documents like crazy, and -dealloc never seems to get called:

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.

Mike
_______________________________________________

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: Markus Spoettl <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>)

  • Prev by Date: Re: Transparent Background for a Progress Indicator (NSView)
  • Next by Date: Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Previous by thread: Re: when should my NSWindowController be released?
  • Next by thread: Re: when should my NSWindowController be released?
  • Index(es):
    • Date
    • Thread