• 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: WindowController never released
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WindowController never released


  • Subject: Re: WindowController never released
  • From: Jeff Gilbert <email@hidden>
  • Date: Wed, 14 Aug 2002 18:30:04 -0500

Yes, I release the windowController after I add it to the document. My code looks something like this:

- (void)makeWindowControllers
{
MyWindowController* windowController = [[MyWindowController allocWithZone:[self zone]] init];
[self addWindowController:windowController];
[windowController release];
}

later,
Jeff Gilbert

On Wednesday, August 14, 2002, at 05:45 PM, Gerben Wierda wrote:

I have subclassed NSWindowController and NSDocument. In NSDocument I have added the makeWindowControllers entry following the instructions in the docs:

- (void)makeWindowControllers {
II2WindowController *myController = [[II2WindowController allocWithZone:[self zone]] initWithWindowNibName:@"II2Package"];
[self addWindowController:myController];
}


But both these retain myController. As a result, when I close the window, my windowcontroller is never dealloced (and thus some object housekeeping never took place). So, this seems wrong as it does not follow the 'closing behaviour' as per the docs.

Shall I just release myDocument in makeWindowControllers?

G
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >WindowController never released (From: Gerben Wierda <email@hidden>)

  • Prev by Date: WindowController never released
  • Next by Date: Classes in bundles
  • Previous by thread: WindowController never released
  • Next by thread: Classes in bundles
  • Index(es):
    • Date
    • Thread