bugGNUstep - Bugs: bug #4608, High NSWindowController retain...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #4608: High NSWindowController retain counts

Submitted by:  Rob Burns <rburns>
Submitted on:  Mon 04 Aug 2003 12:18:51 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Gregory John Casamento <gcasa>
Open/Closed: Closed

Sun 31 Aug 2003 06:19:07 AM UTC, comment #4:

Thanks. It works as advertised here.

Rob Burns <rburns>
Sun 31 Aug 2003 03:44:06 AM UTC, comment #3:

Tested/Committed. Please let me know of any issues.

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Sun 31 Aug 2003 03:23:56 AM UTC, comment #2:

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

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Sat 30 Aug 2003 10:57:06 PM UTC, comment #1:

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.

Fred Kiefer <FredKiefer>
Project Member
Mon 04 Aug 2003 12:18:51 AM UTC, 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.

Rob Burns <rburns>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 31 Aug 2003 03:44:06 AM UTCgcasaStatusNone=>(Error - Not Found)
  Open/ClosedAnalyzed=>(Error - Not Found)
Sat 30 Aug 2003 10:57:06 PM UTCFredKieferAssigned toNone=>NA
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1