Retain/Release and DO patches from Richard Frith-MacDonald

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2571 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1997-10-28 14:34:49 +00:00
parent cd1c0e3508
commit dd9eaaa18b
25 changed files with 697 additions and 134 deletions

View file

@ -45,6 +45,7 @@
#include <Foundation/NSMapTable.h>
#include <Foundation/NSHashTable.h>
#include <Foundation/NSCoder.h>
#include <Foundation/NSAutoreleasePool.h>
#include <assert.h>
@ -262,7 +263,8 @@ static BOOL debug_coder = NO;
{
id ret = [[self class] newReadingFromStream:
[MemoryStream streamWithData:data]];
if ([self retainCount] == 0)
if ([self retainCount]
- [[[self class] autoreleaseClass] autoreleaseCountForObject:self] == 0)
[ret autorelease];
else
[self release];