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:
Richard Frith-MacDonald 2013-08-22 15:44:54 +00:00
parent 8ea74f67d7
commit ed09c55959
102 changed files with 429 additions and 235 deletions

View file

@ -36,7 +36,6 @@
#import "GSTLS.h"
#import "GSURLPrivate.h"
#import "GNUstepBase/GSMime.h"
#import "GNUstepBase/NSObject+GNUstepBase.h"
#import "GNUstepBase/NSString+GNUstepBase.h"
#import "GNUstepBase/NSURL+GNUstepBase.h"
@ -98,7 +97,9 @@ static NSLock *pairLock = nil;
* to the same value.
*/
pairCache = [NSMutableArray new];
[[NSObject leakAt: &pairCache] release];
pairLock = [NSLock new];
[[NSObject leakAt: &pairLock] release];
/* Purge expired pairs at intervals.
*/
[[NSNotificationCenter defaultCenter] addObserver: self
@ -366,8 +367,11 @@ static NSURLProtocol *placeholder = nil;
placeholderClass = [NSURLProtocolPlaceholder class];
placeholder = (NSURLProtocol*)NSAllocateObject(placeholderClass, 0,
NSDefaultMallocZone());
[[NSObject leakAt: &placeholder] release];
registered = [NSMutableArray new];
[[NSObject leakAt: &registered] release];
regLock = [NSLock new];
[[NSObject leakAt: &regLock] release];
[self registerClass: [_NSHTTPURLProtocol class]];
[self registerClass: [_NSHTTPSURLProtocol class]];
[self registerClass: [_NSFTPURLProtocol class]];