mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Fix a few testcase leaks
This commit is contained in:
parent
96a719ae20
commit
3a3a8c47c9
3 changed files with 7 additions and 3 deletions
|
@ -32,6 +32,9 @@ int main()
|
|||
pass([copy1Bitmap bitmapData] != [copy2Bitmap bitmapData],
|
||||
"Copied bitmaps have a different image data pointer - could cause image data corruption.");
|
||||
|
||||
DESTROY(copy1Bitmap);
|
||||
DESTROY(copy2Bitmap);
|
||||
DESTROY(origBitmap);
|
||||
[arp release];
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ int main()
|
|||
START_SET("NSMenuItem key equivalent mask")
|
||||
|
||||
NSString *mask = @"NSKeyEquivModMask";
|
||||
NSMenuItem *item = [[NSMenuItem alloc] init];
|
||||
NSMenuItem *item = AUTORELEASE([[NSMenuItem alloc] init]);
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
NSNumber *encodedKeyMask;
|
||||
NSError *error = nil;
|
||||
|
@ -23,7 +23,8 @@ int main()
|
|||
|
||||
item.keyEquivalentModifierMask = NSShiftKeyMask;
|
||||
|
||||
archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data];
|
||||
archiver = AUTORELEASE(
|
||||
[[NSKeyedArchiver alloc] initForWritingWithMutableData: data]);
|
||||
|
||||
[archiver encodeRootObject: item];
|
||||
[archiver finishEncoding];
|
||||
|
|
|
@ -11,7 +11,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
CREATE_AUTORELEASE_POOL(arp);
|
||||
NSRect f = NSMakeRect(0,0,100,100);
|
||||
NSView *v = [[NSView alloc] initWithFrame: f];
|
||||
NSView *v = AUTORELEASE([[NSView alloc] initWithFrame: f]);
|
||||
int passed = 1;
|
||||
|
||||
if (!NSEqualRects([v visibleRect], f))
|
||||
|
|
Loading…
Reference in a new issue