Non-document app's NSWindow keeps getting retained

David Dunham dunham at mac.com
Tue Feb 5 19:57:39 PST 2008


On 5 Feb 2008, at 14:04, Scott Stevenson wrote:

>> From my debugging, it appears that every time I click another app's  
>> window, the retain count on my NSWindow goes up by 2 (I have a  
>> windowDidResignKey delegate which prints the retain count). I don't  
>> make an NSWindowController.
>
> High retain counts are not necessarily a problem. Sometimes the  
> frameworks may do things like that for reasons that are not obvious  
> on the surface.

True. Though continually increasing reference counts are almost always  
bad.

> Are you actually seeing memory leaks after your window has been  
> closed and you have released it? If so, then you may want to file a  
> bug.


Yes, though it's a little difficult to isolate into a bug report.

I'm ending up solving the overall problem a slightly different way, so  
I probably never will get to the bottom of this...

David Dunham
Voice/Fax: 206 783 7404             http://www.pensee.com/dunham/
Imagination is more important than knowledge. -- Albert Einstein



More information about the MacOSX-dev mailing list