mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Improve workaround; use NSAllocateObject()
This commit is contained in:
parent
57f78a6a7a
commit
0043a7be8d
1 changed files with 2 additions and 12 deletions
|
@ -43,6 +43,8 @@
|
|||
|
||||
#import "GSPThread.h"
|
||||
|
||||
#define class_createInstance(C,E) NSAllocateObject(C,E,NSDefaultMallocZone())
|
||||
|
||||
static Class baseConditionClass = Nil;
|
||||
static Class baseConditionLockClass = Nil;
|
||||
static Class baseLockClass = Nil;
|
||||
|
@ -278,14 +280,11 @@ NSString *NSLockException = @"NSLockException";
|
|||
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
return [super allocWithZone: z];
|
||||
/*
|
||||
if (self == baseLockClass && YES == traceLocks)
|
||||
{
|
||||
return class_createInstance(tracedLockClass, 0);
|
||||
}
|
||||
return class_createInstance(self, 0);
|
||||
*/
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
|
@ -391,14 +390,11 @@ MUNLOCK
|
|||
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
return [super allocWithZone: z];
|
||||
/*
|
||||
if (self == baseRecursiveLockClass && YES == traceLocks)
|
||||
{
|
||||
return class_createInstance(tracedRecursiveLockClass, 0);
|
||||
}
|
||||
return class_createInstance(self, 0);
|
||||
*/
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
|
@ -435,14 +431,11 @@ MUNLOCK
|
|||
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
return [super allocWithZone: z];
|
||||
/*
|
||||
if (self == baseConditionClass && YES == traceLocks)
|
||||
{
|
||||
return class_createInstance(tracedConditionClass, 0);
|
||||
}
|
||||
return class_createInstance(self, 0);
|
||||
*/
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
|
@ -538,14 +531,11 @@ MUNLOCK
|
|||
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
return [super allocWithZone: z];
|
||||
/*
|
||||
if (self == baseConditionLockClass && YES == traceLocks)
|
||||
{
|
||||
return class_createInstance(tracedConditionLockClass, 0);
|
||||
}
|
||||
return class_createInstance(self, 0);
|
||||
*/
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue