bug-gnustep
[Top][All Lists]
Advanced

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

Gorm bugs (with patch)


From: Ludovic Marcotte
Subject: Gorm bugs (with patch)
Date: Fri, 2 Nov 2001 17:19:26 -0500 (EST)

Hi,

In GormDocument: -dealloc we have:

- (void) dealloc
{
  [[NSNotificationCenter defaultCenter] removeObserver: self];
  [window setDelegate: nil];
  [window performClose: self];
  RELEASE(classManager);
  RELEASE(classEditor);
  RELEASE(hidden);
  RELEASE(window);
  RELEASE(filesOwner);
  RELEASE(firstResponder);
  RELEASE(fontManager);
  NSFreeMapTable(objToName);
  RELEASE(documentPath);
  RELEASE(savedEditors);
  
  RELEASE(selectionBox); 
  RELEASE(scrollView);
  RELEASE(classesScrollView);
  [super dealloc];
}

We should not call RELEASE(window) since it'll actually be released when 
calling performClose: (actually, in NSWindow: -close called by NSWindow: 
-performClose:).

We should also not call RELEASE(selectionBox) since we already release it 
right after adding it as a subview to the window's content view.

Not applying this 'patch' will cause a segfault when -dealloc is called 
(for example, if you do Document -> Open... -> Cancel)

Thanks,

Ludo

-- 
Live as if you were to die tomorrow.
Learn as if you were to live forever.
 - Gandhi




reply via email to

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