mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +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
5524e281f9
commit
9326334ae8
3 changed files with 17 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue