mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix leaks
This commit is contained in:
parent
bdad4987ae
commit
91be2c2c83
4 changed files with 7 additions and 7 deletions
|
@ -76,8 +76,8 @@ int main()
|
|||
"NSZoneFromPointer() returns zone where memory came from");
|
||||
|
||||
NS_DURING
|
||||
[NSString allocWithZone:aZone];
|
||||
NSRecycleZone(aZone);
|
||||
NSZoneMalloc(aZone, 42);
|
||||
NSRecycleZone(aZone);
|
||||
PASS(1,"NSRecycleZone seems to operate");
|
||||
NS_HANDLER
|
||||
PASS(0,"NSRecycleZone seems to operate");
|
||||
|
|
|
@ -45,7 +45,7 @@ int main(int argc,char **argv)
|
|||
result = [[array valueForKeyPath:@"@count"] intValue] == 2;
|
||||
PASS(result, "-[NSArray valueForKeyPath: @\"@count\"]");
|
||||
|
||||
aiv = [ArrayIVar new];
|
||||
aiv = AUTORELEASE([ArrayIVar new]);
|
||||
ivar = [NSArray arrayWithObjects: @"Joe", @"Foo", @"Bar", @"Cat", nil];
|
||||
[aiv setTestArray: ivar];
|
||||
|
||||
|
|
|
@ -43,9 +43,9 @@ int main()
|
|||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
|
||||
DefaultNil * defaultNil = [DefaultNil new];
|
||||
DeprecatedNil * deprecatedNil = [DeprecatedNil new];
|
||||
SetNil * setNil = [SetNil new];
|
||||
DefaultNil *defaultNil = AUTORELEASE([DefaultNil new]);
|
||||
DeprecatedNil *deprecatedNil = AUTORELEASE([DeprecatedNil new]);
|
||||
SetNil *setNil = AUTORELEASE([SetNil new]);
|
||||
|
||||
PASS_EXCEPTION([defaultNil setValue: nil forKey: @"num"],
|
||||
NSInvalidArgumentException, "KVC handles setting nil for a scalar")
|
||||
|
|
|
@ -33,7 +33,7 @@ int main()
|
|||
tClass = NSClassFromString(@"InvokeTarget");
|
||||
|
||||
|
||||
tar = [tClass new];
|
||||
tar = AUTORELEASE([tClass new]);
|
||||
|
||||
/*
|
||||
Test if the return value is retained. It is in the Apple OpenStep edition
|
||||
|
|
Loading…
Reference in a new issue