mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
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:
parent
7dab90481b
commit
820482b623
2 changed files with 18 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue