mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Another memory management tweak.
This commit is contained in:
parent
7532837db4
commit
1d473e573a
1 changed files with 11 additions and 1 deletions
|
@ -623,6 +623,7 @@ main(int argc, char **argv, char **env)
|
|||
{
|
||||
NSProcessInfo *proc;
|
||||
unsigned i;
|
||||
NSMutableDictionary *safe;
|
||||
NSDictionary *argsRecognized;
|
||||
NSUserDefaults *defs;
|
||||
NSFileManager *mgr;
|
||||
|
@ -728,6 +729,11 @@ main(int argc, char **argv, char **env)
|
|||
|
||||
outer = [NSAutoreleasePool new];
|
||||
|
||||
/* Objects we want to persist until the outer autorelease pool is exited
|
||||
* can be stored in the 'safe; dictionary.
|
||||
*/
|
||||
safe = [NSMutableDictionary dictionary];
|
||||
|
||||
#ifndef HAVE_LIBXML
|
||||
NSLog(@"ERROR: The GNUstep Base Library was built\n"
|
||||
@" without an available libxml library. Autogsdoc needs the libxml\n"
|
||||
|
@ -897,6 +903,7 @@ main(int argc, char **argv, char **env)
|
|||
declared = [defs stringForKey: @"Declared"];
|
||||
project = [defs stringForKey: @"Project"];
|
||||
refsName = [project stringByAppendingPathExtension: @"igsdoc"];
|
||||
[safe setObject: refsName forKey: @"refsName"];
|
||||
|
||||
headerDirectory = [defs stringForKey: @"HeaderDirectory"];
|
||||
if (headerDirectory == nil)
|
||||
|
@ -1006,6 +1013,7 @@ main(int argc, char **argv, char **env)
|
|||
stringByAppendingPathComponent: project];
|
||||
refsFile = [refsFile stringByAppendingPathExtension: @"igsdoc"];
|
||||
projectRefs = AUTORELEASE([AGSIndex new]);
|
||||
[safe setObject: projectRefs forKey: @"projectRefs"];
|
||||
originalIndex = nil;
|
||||
rDate = [NSDate distantPast];
|
||||
if ([mgr isReadableFileAtPath: refsFile] == YES)
|
||||
|
@ -1020,6 +1028,7 @@ main(int argc, char **argv, char **env)
|
|||
{
|
||||
NSDictionary *dict;
|
||||
|
||||
[safe setObject: originalIndex forKey: @"originalIndex"];
|
||||
[projectRefs mergeRefs: originalIndex override: NO];
|
||||
if (verbose)
|
||||
{
|
||||
|
@ -1730,11 +1739,12 @@ main(int argc, char **argv, char **env)
|
|||
NSLog(@"Sorry unable to write %@", refsFile);
|
||||
}
|
||||
}
|
||||
DESTROY(originalIndex);
|
||||
originalIndex = nil;
|
||||
DESTROY(merged);
|
||||
}
|
||||
|
||||
globalRefs = AUTORELEASE([AGSIndex new]);
|
||||
[safe setObject: globalRefs forKey: @"globalRefs"];
|
||||
|
||||
/*
|
||||
* 8) If we are either generating html output, or relocating existing
|
||||
|
|
Loading…
Reference in a new issue