From 8420776152e3c8531fdcf51958a5e705c9d615f3 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Fri, 7 May 1999 09:02:43 +0000 Subject: [PATCH] Improve performance of [-release] git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4220 72102866-910b-0410-8b05-ffd578937521 --- Source/NSBundle.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/NSBundle.m b/Source/NSBundle.m index 93121111a..9d65732a7 100644 --- a/Source/NSBundle.m +++ b/Source/NSBundle.m @@ -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]; }