Memory leak fixed

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4504 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-07-02 07:35:41 +00:00
parent 7dab90481b
commit 820482b623
2 changed files with 18 additions and 4 deletions

View file

@ -309,10 +309,9 @@ mapClassName(NSUnarchiverObjectInfo *info)
NSUnarchiver *unarchiver;
id obj;
unarchiver = [self allocWithZone: NSDefaultMallocZone()];
unarchiver = [[self alloc] initForReadingWithData: anObject];
NS_DURING
{
unarchiver = [unarchiver initForReadingWithData: anObject];
obj = [unarchiver decodeObject];
}
NS_HANDLER
@ -386,7 +385,16 @@ mapClassName(NSUnarchiverObjectInfo *info)
objDict = [[NSMutableDictionary allocWithZone: zone]
initWithCapacity: 200];
[self resetUnarchiverWithData: anObject atIndex: 0];
NS_DURING
{
[self resetUnarchiverWithData: anObject atIndex: 0];
}
NS_HANDLER
{
RELEASE(self);
[localException raise];
}
NS_ENDHANDLER
}
return self;
}
@ -1198,7 +1206,7 @@ mapClassName(NSUnarchiverObjectInfo *info)
{
Class c;
RELEASE(data);
TEST_RELEASE(data);
data = RETAIN(anObject);
c = fastClass(data);
if (src != self)