Improve performance of [-release]

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4220 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-05-07 09:02:43 +00:00
parent 7f8d5fc9af
commit 8420776152

View file

@ -462,8 +462,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
format: @"Bundle for path %@ released too many times", _path]; format: @"Bundle for path %@ released too many times", _path];
} }
if ([self retainCount] if ([self retainCount] == 0)
- [[[self class] autoreleaseClass] autoreleaseCountForObject:self] == 0)
{ {
/* Cache all bundles */ /* Cache all bundles */
if (_bundleType == NSBUNDLE_APPLICATION if (_bundleType == NSBUNDLE_APPLICATION
@ -472,10 +471,8 @@ _bundle_load_callback(Class theClass, Category *theCategory)
{ {
NSMapRemove(_bundles, _path); NSMapRemove(_bundles, _path);
NSMapInsert(_releasedBundles, _path, self); NSMapInsert(_releasedBundles, _path, self);
return;
} }
else
[self dealloc];
return;
} }
[super release]; [super release];
} }