mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fixed memory leaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3632 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a45af02296
commit
c0c45390f5
3 changed files with 17 additions and 8 deletions
|
@ -1,8 +1,13 @@
|
|||
Mon Feb 1 9:55:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* src/NSArray.m: ([-initWithContentsOfFile:]) Fixed memory leak.
|
||||
* src/NSDictionary.m: ([-initWithContentsOfFile:]) Fixed memory leak.
|
||||
|
||||
Sat Jan 30 5:55:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
Tidying up brain-damaged changes I made while ill.
|
||||
src/NSConnection.m: Tidied proxy handling a bit
|
||||
src/NSDistantObject.m: Tidied - made closer to OpenStep spec.
|
||||
* src/NSConnection.m: Tidied proxy handling a bit
|
||||
* src/NSDistantObject.m: Tidied - made closer to OpenStep spec.
|
||||
|
||||
Fri Jan 29 11:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
|
|
|
@ -312,18 +312,20 @@ static Class NSMutableArray_concrete_class;
|
|||
{
|
||||
NSString *myString;
|
||||
|
||||
myString = [[NSString alloc] initWithContentsOfFile:file];
|
||||
myString = [[NSString alloc] initWithContentsOfFile: file];
|
||||
if (myString)
|
||||
{
|
||||
id result = [myString propertyList];
|
||||
if ( [result isKindOfClass: [NSArray class]] )
|
||||
|
||||
[myString release];
|
||||
if ([result isKindOfClass: [NSArray class]])
|
||||
{
|
||||
[self initWithArray: result];
|
||||
return self;
|
||||
}
|
||||
}
|
||||
NSLog(@"Contents of file does not contain an array");
|
||||
[self dealloc];
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
|
@ -382,18 +382,20 @@ static Class NSMutableDictionary_concrete_class;
|
|||
{
|
||||
NSString *myString;
|
||||
|
||||
myString = [[NSString alloc] initWithContentsOfFile:path];
|
||||
myString = [[NSString alloc] initWithContentsOfFile: path];
|
||||
if (myString)
|
||||
{
|
||||
id result = [myString propertyList];
|
||||
if ( [result isKindOfClass: [NSDictionary class]] )
|
||||
|
||||
[myString release];
|
||||
if ([result isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
[self initWithDictionary: result];
|
||||
return self;
|
||||
}
|
||||
}
|
||||
NSLog(@"Contents of file does not contain a dictionary");
|
||||
[self autorelease];
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue