mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
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:
parent
96e74933dd
commit
c54d34a692
1 changed files with 7 additions and 12 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue