mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +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];
|
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];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue