[Top][All Lists]

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

Incorrect behaviour in NSWindowController...

From: Gregory John Casamento
Subject: Incorrect behaviour in NSWindowController...
Date: Fri, 19 Mar 2004 19:30:46 -0800 (PST)

When the window associated with an NSWindowController has isReleasedWhenClosed
set to true, the window controller does an extra retain.

It says so in the comments:
           * If the window is set to isReleasedWhenClosed, it will release
           * itself, so we have to retain it once more.
           * Apple's implementation doesn't seem to deal with this case, and
           * crashes if isReleaseWhenClosed is set.

Alex M. and I discussed this and it looks highly suspect.   I believe that
might cause a memory leak.  Also, I beleive that it will promote writing of
sloppy code since the developer will be able to have code which works on
GNUstep, but might fail on MOSX.

I am going to remove the code which does the extra retain, unless someone comes
up with a very convincing defense for leaving it in.


Gregory John Casamento -- CEO/President Open Logic Corp.

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

reply via email to

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