mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Don't create a zone in GC mode (detected at run time). This avoids a warning
when starting GUI apps in GC mode, but should have no real effect on functionality. Note: this zone seems to have been created for OpenStep compatibility, but then we don't actually use it anywhere. The Cocoa docs say that this is 'The zone from which NSMenu objects should be allocated', but we allocate NSMenu objects from the default malloc zone. Fred: I think the correct thing to do here is probably to just return NSDefaultMallocZone() from +menuZone in all modes. Can you take a look and see? git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33150 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c3ab6f122e
commit
cebd150ee1
1 changed files with 6 additions and 1 deletions
|
@ -39,6 +39,7 @@
|
|||
#import <Foundation/NSCharacterSet.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSGarbageCollector.h>
|
||||
#import <Foundation/NSProcessInfo.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
|
@ -577,7 +578,11 @@ static BOOL menuBarVisible = YES;
|
|||
{
|
||||
[self setVersion: 1];
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
menuZone = NSCreateZone(0, 0, YES);
|
||||
// If we're not running in GC mode, create a new zone
|
||||
if ([NSGarbageCollector defaultCollector] == nil)
|
||||
{
|
||||
menuZone = NSCreateZone(0, 0, YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue