bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindowController


From: Fred Kiefer
Subject: Re: NSWindowController
Date: Sat, 26 Jul 2003 18:20:49 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204

Andrew Ruder wrote:
Quick question: 144 - (void) setDocument: (NSDocument *)document
    145 {
    146   // FIXME - this is RETAINed and never RELEASEd ...
    147   ASSIGN (_document, document);
    148   [self synchronizeWindowTitleWithDocumentName];
in NSWindowController.m

Is there some reason the RELEASE of _document can't just
be put in the dealloc method or is it more involved than that?
(I'm not seeing any reason why not right away here...)

Your solution looks fine for me.
Actually for many window controlers the document gets freed by a cal to [_windowWillClose:], but only if the window returns YEAS from isReleasedWhenClosed.

Fred





reply via email to

[Prev in Thread] Current Thread [Next in Thread]