gnustep-dev
[Top][All Lists]
Advanced

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

Re: Incorrect behaviour in NSWindowController...


From: Fred Kiefer
Subject: Re: Incorrect behaviour in NSWindowController...
Date: Sat, 20 Mar 2004 19:06:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821

Gregory John Casamento wrote:
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.


Could you please expalin in more detail, what the possible problem here is? From this mail it just looks like trying to mimik a bug of MacOSX, which surely is not worthwhile and probably not what you intend to achive. As this is a rather old line of code, I would not be to surprised to learn that it is now obsolete. But I would like to understand it first.





reply via email to

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