mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
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:
parent
cd1c0e3508
commit
dd9eaaa18b
25 changed files with 697 additions and 134 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue