Fixed error in release of bundles that shouldn't be deallocated.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4239 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-05-11 10:11:48 +00:00
parent 96e74933dd
commit c54d34a692

View file

@ -275,7 +275,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
mutableCopy]); mutableCopy]);
[system appendString: @"/Libraries"]; [system appendString: @"/Libraries"];
_gnustep_bundle = [NSBundle bundleWithPath: system]; _gnustep_bundle = RETAIN([NSBundle bundleWithPath: system]);
} }
} }
} }
@ -458,7 +458,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
{ {
if (_codeLoaded == YES || self == _mainBundle || self == _gnustep_bundle) if (_codeLoaded == YES || self == _mainBundle || self == _gnustep_bundle)
{ {
if ([self retainCount] == 0) if ([self retainCount] == 1)
{ {
if (self == NSMapGet(_releasedBundles, _path)) if (self == NSMapGet(_releasedBundles, _path))
{ {
@ -481,12 +481,9 @@ _bundle_load_callback(Class theClass, Category *theCategory)
NSMapRemove(_bundles, _path); NSMapRemove(_bundles, _path);
RELEASE(_path); RELEASE(_path);
} }
if (_bundleClasses) TEST_RELEASE(_bundleClasses);
RELEASE(_bundleClasses); TEST_RELEASE(_infoDict);
if (_infoDict) TEST_RELEASE(_localizations);
RELEASE(_infoDict);
if (_localizations)
RELEASE(_localizations);
[super dealloc]; [super dealloc];
} }
@ -945,11 +942,9 @@ _bundle_load_callback(Class theClass, Category *theCategory)
*/ */
pInfo = [NSProcessInfo processInfo]; pInfo = [NSProcessInfo processInfo];
env = [pInfo environment]; env = [pInfo environment];
user = AUTORELEASE([[env objectForKey: @"GNUSTEP_USER_ROOT"] user = AUTORELEASE([[env objectForKey: @"GNUSTEP_USER_ROOT"] mutableCopy]);
mutableCopy]);
[user appendString: @"/Libraries"]; [user appendString: @"/Libraries"];
local = AUTORELEASE([[env objectForKey: @"GNUSTEP_LOCAL_ROOT"] local = AUTORELEASE([[env objectForKey: @"GNUSTEP_LOCAL_ROOT"] mutableCopy]);
mutableCopy]);
[local appendString: @"/Libraries"]; [local appendString: @"/Libraries"];
if (user) if (user)