mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
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:
parent
7f8d5fc9af
commit
8420776152
1 changed files with 2 additions and 5 deletions
|
@ -462,8 +462,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
format: @"Bundle for path %@ released too many times", _path];
|
||||
}
|
||||
|
||||
if ([self retainCount]
|
||||
- [[[self class] autoreleaseClass] autoreleaseCountForObject:self] == 0)
|
||||
if ([self retainCount] == 0)
|
||||
{
|
||||
/* Cache all bundles */
|
||||
if (_bundleType == NSBUNDLE_APPLICATION
|
||||
|
@ -472,10 +471,8 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
{
|
||||
NSMapRemove(_bundles, _path);
|
||||
NSMapInsert(_releasedBundles, _path, self);
|
||||
return;
|
||||
}
|
||||
else
|
||||
[self dealloc];
|
||||
return;
|
||||
}
|
||||
[super release];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue