[initialize] retain the gui bundle and added an auto release pool

as this might be called without one installed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11888 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-12-23 13:30:35 +00:00
parent 2d05f0e6a9
commit 16c4b83d48

View file

@ -440,6 +440,7 @@ static NSCell* tileCell = nil;
{
if (self == [NSApplication class])
{
CREATE_AUTORELEASE_POOL(pool);
/*
* Dummy functions to fool linker into linking files that contain
* only catagories - static libraries seem to have problems here.
@ -453,13 +454,15 @@ static NSCell* tileCell = nil;
/* Create the gui bundle we use to localize messages. */
guiBundle = [NSBundle bundleForLibrary: @"gnustep-gui"];
RETAIN(guiBundle);
/* Save the base library exception handler */
defaultUncaughtExceptionHandler = NSGetUncaughtExceptionHandler ();
/* Cache the NSAutoreleasePool class */
arpClass = [NSAutoreleasePool class];
nc = [NSNotificationCenter defaultCenter];
RELEASE(pool);
}
}