bug-gnustep
[Top][All Lists]
Advanced

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

[bug #4608] High NSWindowController retain counts


From: nobody
Subject: [bug #4608] High NSWindowController retain counts
Date: Sun, 31 Aug 2003 02:19:08 -0400
User-agent: Links (2.1pre11; Linux 2.6.0-test2 i686; x)

=================== BUG #4608: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4608&group_id=99

Changes by: Rob Burns <rburns@softhome.net>
Date: Sun 08/31/03 at 06:19 (GMT)

------------------ Additional Follow-up Comments ----------------------------
Thanks. It works as advertised here.



=================== BUG #4608: FULL BUG SNAPSHOT ===================


Submitted by: rburns                  Project: GNUstep                      
Submitted on: Mon 08/04/03 at 00:18
Category:  Gui/AppKit                 Severity:  5 - Major                  
Bug Group:  Bug                       Resolution:  Fixed                    
Assigned to:  gcasa                   Status:  Closed                       

Summary:  High NSWindowController retain counts

Original Submission:  When using a subclass of NSWindowController and a Gorm 
file, the NSWindowController doesn't get released when the window is closed, 
because the retain count is too high. There is a test for this here:



http://www.eskimo.com/~pburns/rob/NSWCTest.tar.gz



It should work on either gnustep or a mac with gnustep-make installed.

Follow-up Comments
*******************

-------------------------------------------------------
Date: Sun 08/31/03 at 06:19         By: rburns
Thanks. It works as advertised here.

-------------------------------------------------------
Date: Sun 08/31/03 at 03:44         By: gcasa
Tested/Committed. Please let me know of any issues.



-------------------------------------------------------
Date: Sun 08/31/03 at 03:23         By: gcasa
The issue was that when "establishConnection" is being called on all of the 
objects after the gorm is loaded the code in awakeWithContext was not 
performing a RELEASE on the connector.  Since the connector is no lonber 
needed, this should be done.



Once done here are the results of the attached program:



nt after alloc, init, and ordering - 2

2003-08-31 03:27:56.810 NSWCTest[23361] <MyWindowController: 8355d18> retain 
count just before RELEASE(self) - 1

2003-08-31 03:28:10.017 NSWCTest[23361] <MyWindowController: 82aa4d0> retain 
count upon entering initWithModel: - 1

2003-08-31 03:28:10.017 NSWCTest[23361] <MyWindowController: 82aa4d0> retain 
count after initWithWindowNibName:owner: - 1

2003-08-31 03:28:10.019 NSWCTest[23361] Unable to open fixed font

2003-08-31 03:28:10.024 NSWCTest[23361] <MyWindowController: 82aa4d0> retain 
count after [self window] - 2

2003-08-31 03:28:10.045 NSWCTest[23361] <MyWindowController: 82aa4d0> retain 
count after alloc, init, and ordering - 2

2003-08-31 03:28:16.204 NSWCTest[23361] <MyWindowController: 82aa4d0> retain 
count just before RELEASE(self) - 1



Which I believe is correct.   I am running some additional tests to make 
certain this does not impact anything else, but I believe that this is the 
solution. GJC

-------------------------------------------------------
Date: Sat 08/30/03 at 22:57         By: FredKiefer
I did look into the problem with the help of our test application and the 
retain count seems to come mostly from the NIB loading itself. Here 
intermediate objects get generated that never get freed again and thereby 
retain references to the window controller, as can be seen from this backtrace:

#0  0x08048fa2 in _i_MyWindowController__retain ()
#1  0x400abd92 in _i_NSNibConnector__setDestination_ ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-gui.so.0
#2  0x401e296d in _i_GSNibContainer__awakeWithContext_ ()
   from /usr/GNUstep/System/Library/Libraries/libgnustep-gui.so.0
#3  0x400ac910 in 
_c_NSBundle_NSBundleAdditions_loadNibFile_externalNameTable_withZone_ () from 
/usr/GNUstep/System/Library/Libraries/libgnustep-gui.so.0

I hope Gregory has an idea to resolve this problem.



CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4608&group_id=99

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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