mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
leak detection improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37003 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
edc02cf9e5
commit
1483924463
102 changed files with 429 additions and 235 deletions
|
@ -39,7 +39,6 @@
|
|||
#import "Foundation/NSNotification.h"
|
||||
#import "Foundation/NSCharacterSet.h"
|
||||
#import "Foundation/NSData.h"
|
||||
#import "GNUstepBase/NSObject+GNUstepBase.h"
|
||||
|
||||
/* Using and index set to hold a characterset is more space efficient but
|
||||
* on the intel core-2 system I benchmarked on, it made my applications
|
||||
|
@ -637,9 +636,9 @@ static Class concreteMutableClass = nil;
|
|||
|
||||
+ (void) initialize
|
||||
{
|
||||
static BOOL one_time = NO;
|
||||
static BOOL beenHere = NO;
|
||||
|
||||
if (one_time == NO)
|
||||
if (beenHere == NO)
|
||||
{
|
||||
abstractClass = [NSCharacterSet class];
|
||||
abstractMutableClass = [NSMutableCharacterSet class];
|
||||
|
@ -650,9 +649,10 @@ static Class concreteMutableClass = nil;
|
|||
concreteClass = [NSBitmapCharSet class];
|
||||
concreteMutableClass = [NSMutableBitmapCharSet class];
|
||||
#endif
|
||||
one_time = YES;
|
||||
cache_lock = [GSLazyLock new];
|
||||
[[NSObject leakAt: &cache_lock] release];
|
||||
beenHere = YES;
|
||||
}
|
||||
cache_lock = [GSLazyLock new];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -674,6 +674,7 @@ static Class concreteMutableClass = nil;
|
|||
freeWhenDone: NO];
|
||||
cache_set[number]
|
||||
= [[_GSStaticCharSet alloc] initWithBitmap: bitmap number: number];
|
||||
[[NSObject leakAt: &cache_set[number]] release];
|
||||
RELEASE(bitmap);
|
||||
}
|
||||
[cache_lock unlock];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue