mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
|
@ -35,6 +35,7 @@
|
|||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSLock.h>
|
||||
#include <Foundation/NSMapTable.h>
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -365,8 +366,8 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
format: @"Bundle for path %@ released too many times", _path];
|
||||
}
|
||||
|
||||
NSParameterAssert(_retainCount >= 0);
|
||||
if (_retainCount == 0)
|
||||
if ([self retainCount]
|
||||
- [[[self class] autoreleaseClass] autoreleaseCountForObject:self] == 0)
|
||||
{
|
||||
/* Cache all bundles */
|
||||
if (_bundleType == NSBUNDLE_APPLICATION
|
||||
|
@ -380,18 +381,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
[self dealloc];
|
||||
return;
|
||||
}
|
||||
_retainCount--;
|
||||
}
|
||||
|
||||
- retain
|
||||
{
|
||||
_retainCount++;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (unsigned) retainCount
|
||||
{
|
||||
return _retainCount;
|
||||
[super release];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue