mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fix leaks
This commit is contained in:
parent
8209fa428f
commit
77c66e3d95
23 changed files with 287 additions and 259 deletions
|
@ -469,6 +469,7 @@ static SEL appSel;
|
|||
|
||||
if (objectCount != [keys count])
|
||||
{
|
||||
RELEASE(self);
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"init with obj and key arrays of different sizes"];
|
||||
}
|
||||
|
|
|
@ -91,11 +91,11 @@ static Class NSFileHandle_ssl_class = nil;
|
|||
{
|
||||
if (self == NSFileHandle_abstract_class)
|
||||
{
|
||||
return NSAllocateObject (NSFileHandle_concrete_class, 0, z);
|
||||
return NSAllocateObject(NSFileHandle_concrete_class, 0, z);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NSAllocateObject (self, 0, z);
|
||||
return NSAllocateObject(self, 0, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -989,7 +989,7 @@ static gs_mutex_t classLock = GS_MUTEX_INIT_STATIC;
|
|||
errorHandler: handler
|
||||
for: self];
|
||||
|
||||
return direnum;
|
||||
return AUTORELEASE(direnum);
|
||||
}
|
||||
|
||||
- (NSArray*) contentsOfDirectoryAtPath: (NSString*)path error: (NSError**)error
|
||||
|
|
|
@ -121,6 +121,7 @@
|
|||
|
||||
[_invocation getReturnValue: buffer];
|
||||
result = [NSValue valueWithBytes: buffer objCType: returnType];
|
||||
free(buffer);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -75,8 +75,6 @@ static void *isFinishedCtxt = (void*)"isFinished";
|
|||
static void *isReadyCtxt = (void*)"isReady";
|
||||
static void *queuePriorityCtxt = (void*)"queuePriority";
|
||||
|
||||
static NSArray *empty = nil;
|
||||
|
||||
@interface NSOperation (Private)
|
||||
- (void) _finish;
|
||||
- (void) _updateReadyState;
|
||||
|
@ -91,12 +89,6 @@ static NSArray *empty = nil;
|
|||
return NO;
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
empty = [NSArray new];
|
||||
RELEASE([NSObject leakAt: &empty]);
|
||||
}
|
||||
|
||||
- (void) addDependency: (NSOperation *)op
|
||||
{
|
||||
if (NO == [op isKindOfClass: [NSOperation class]])
|
||||
|
@ -228,7 +220,7 @@ static NSArray *empty = nil;
|
|||
|
||||
if (internal->dependencies == nil)
|
||||
{
|
||||
a = empty; // OSX return an empty array
|
||||
a = [NSArray array]; // OSX return an empty array
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue