mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
GSMemoryPanel: Only call GSDebug* in debug mode (#289)
The GSDebug* methods are conditional on NDEBUG not being defined; so do not attempt to call these methods if this variable is not set.
This commit is contained in:
parent
6a3681aa82
commit
3784462321
1 changed files with 4 additions and 0 deletions
|
@ -191,7 +191,9 @@ static GSMemoryPanel *sharedGSMemoryPanel = nil;
|
|||
NSButton *button;
|
||||
|
||||
/* Activate debugging of allocation. */
|
||||
#ifndef NDEBUG
|
||||
GSDebugAllocationActive (YES);
|
||||
#endif
|
||||
|
||||
hbox = [GSHbox new];
|
||||
[hbox setDefaultMinXMargin: 5];
|
||||
|
@ -359,6 +361,7 @@ static GSMemoryPanel *sharedGSMemoryPanel = nil;
|
|||
|
||||
- (void) update: (id)sender
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
Class *classList = GSDebugAllocationClassList ();
|
||||
Class *pointer;
|
||||
GSMemoryPanelEntry *entry;
|
||||
|
@ -388,6 +391,7 @@ static GSMemoryPanel *sharedGSMemoryPanel = nil;
|
|||
NSZoneFree(NSDefaultMallocZone(), classList);
|
||||
|
||||
[array sortUsingSelector: orderingBy];
|
||||
#endif
|
||||
|
||||
[table reloadData];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue