Skip to content

Commit

Permalink
fix leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Jan 8, 2025
1 parent ce6f8ff commit bf90656
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/base/NSCountedSet/basic.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
id testObject = [NSCountedSet new];
id testObject = AUTORELEASE([NSCountedSet new]);
test_alloc(@"NSCountedSet");
test_NSObject(@"NSCountedSet",[NSArray arrayWithObject:testObject]);
test_NSCoding([NSArray arrayWithObject:testObject]);
Expand Down
3 changes: 2 additions & 1 deletion Tests/base/NSDictionary/general.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int main()
[obj count] == 0,
"-description gives us a text property-list");

dict = [[NSDictionary dictionaryWithObjects:vals1 forKeys:keys1] retain];
ASSIGN(dict, [NSDictionary dictionaryWithObjects:vals1 forKeys:keys1]);
PASS(dict != nil &&
[dict isKindOfClass:[NSDictionary class]] &&
[dict count] == 2,
Expand Down Expand Up @@ -263,6 +263,7 @@ int main()
@"val", a, @"val2", @"key2", nil];
PASS_EQUAL([d objectForKey: a], @"val", "array as dictionary key works")

RELEASE(dict);
[arp release]; arp = nil;
return 0;
}

0 comments on commit bf90656

Please sign in to comment.