mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Fix memory leaks found by static analyser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32529 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
02d5a28637
commit
782af1ee89
8 changed files with 20 additions and 5 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2011-03-10 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* TextConverters/RTF/RTFConsumer.m
|
||||
* Source/GSNibLoading.m
|
||||
* Source/NSInputManager.m
|
||||
* Source/NSEPSImageRep.m
|
||||
* Model/GMArchiver.m
|
||||
* Tools/set_show_service.m
|
||||
* Tools/GSspell.m: Fix memory leaks found by static analyser.
|
||||
|
||||
2011-03-10 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSTitleView.h,
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString*) newLabel
|
||||
- (NSString*) nextLabel
|
||||
{
|
||||
return [NSString stringWithFormat: @"Object%5d", ++counter];
|
||||
}
|
||||
|
@ -256,7 +256,7 @@
|
|||
label = NSHashGet(conditionals, anObject);
|
||||
if (label) {
|
||||
NSHashRemove(conditionals, anObject);
|
||||
NSMapInsert(objects, anObject, [self newLabel]);
|
||||
NSMapInsert(objects, anObject, [self nextLabel]);
|
||||
return label;
|
||||
}
|
||||
}
|
||||
|
@ -274,7 +274,7 @@
|
|||
label = name;
|
||||
}
|
||||
else
|
||||
label = [self newLabel];
|
||||
label = [self nextLabel];
|
||||
|
||||
NSMapInsert(objects, anObject, label);
|
||||
|
||||
|
|
|
@ -1474,6 +1474,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
Class newCellClass = [newClass cellClass];
|
||||
if (newCellClass != [NSCell class])
|
||||
{
|
||||
RELEASE(obj);
|
||||
result = [[newCellClass alloc] initWithCoder: coder];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
// Initializing a New Instance
|
||||
+ (id) imageRepWithData: (NSData *)epsData
|
||||
{
|
||||
return [[self alloc] initWithData: epsData];
|
||||
return AUTORELEASE([[self alloc] initWithData: epsData]);
|
||||
}
|
||||
|
||||
- (id) initWithData: (NSData *)epsData
|
||||
|
|
|
@ -290,7 +290,7 @@ static NSInputManager *currentInputManager = nil;
|
|||
NSString *c = [NSString stringWithCharacters: &character length: 1];
|
||||
[description appendString: c];
|
||||
}
|
||||
return description;
|
||||
return AUTORELEASE(description);
|
||||
}
|
||||
|
||||
- (void) loadBindingsFromFile: (NSString *)fullPath
|
||||
|
|
|
@ -482,6 +482,7 @@ static BOOL classInheritsFromNSMutableAttributedString (Class c)
|
|||
if (attachment == nil)
|
||||
{
|
||||
NSLog(@"No attachment at %d", oldPosition);
|
||||
RELEASE(image);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -531,6 +531,8 @@ int main(int argc, char** argv)
|
|||
{
|
||||
NSLog(@"Cannot create spell checker instance");
|
||||
}
|
||||
RELEASE(aSpellChecker);
|
||||
RELEASE(aServer);
|
||||
RELEASE(_pool);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -93,6 +93,7 @@ main(int argc, char** argv, char **env)
|
|||
}
|
||||
|
||||
NSLog(@"Nothing to do.\n");
|
||||
RELEASE(pool);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue