From 6825599ba55aab8d9b47fe047649ca949d89f67d Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Thu, 9 Dec 2004 02:06:22 +0000 Subject: [PATCH] Fixed a leak in GormOutlineView.m git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20431 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ GormDocument.m | 1 - GormOutlineView.m | 22 +++++++++++++--------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40e67c9d..a4aa8596 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-12-08 21:03 Gregory John Casamento + + * GormOutlineView.m: Corrected a leak. + 2004-12-08 19:52 Gregory John Casamento * GormClassEditor.m: Use new ivar to store selected class. diff --git a/GormDocument.m b/GormDocument.m index 79c290de..6c0cbdd4 100644 --- a/GormDocument.m +++ b/GormDocument.m @@ -918,7 +918,6 @@ static NSImage *fileImage = nil; RELEASE(filePrefsView); // release editors... - RELEASE(classesView); RELEASE(savedEditors); RELEASE(openEditors); diff --git a/GormOutlineView.m b/GormOutlineView.m index 07ab641d..1c912780 100644 --- a/GormOutlineView.m +++ b/GormOutlineView.m @@ -129,20 +129,24 @@ static NSColor *darkGreyBlueColor = nil; - init { - [super init]; - _actionColumn = nil; - _outletColumn = nil; - _isEditing = NO; - _attributeOffset = 0.0; - _edittype = None; - _menuItem = nil; - [self setDoubleAction: @selector(_handleDoubleClick:)]; - [self setTarget: self]; + if((self = [super init]) != nil) + { + _actionColumn = nil; + _outletColumn = nil; + _isEditing = NO; + _attributeOffset = 0.0; + _edittype = None; + _menuItem = nil; + [self setDoubleAction: @selector(_handleDoubleClick:)]; + [self setTarget: self]; + } + return self; } - (void) dealloc { + [super dealloc]; } - (void) collapseItem: (id)item collapseChildren: (BOOL)collapseChildren;