diff --git a/Testing/nsdata.m b/Testing/nsdata.m index f03ebc9a8..bc41b55b8 100644 --- a/Testing/nsdata.m +++ b/Testing/nsdata.m @@ -11,6 +11,8 @@ main() id o; id pool; + [NSAutoreleasePool enableDoubleReleaseCheck:YES]; + pool = [[NSAutoreleasePool alloc] init]; d = [NSData dataWithContentsOfMappedFile:@"nsdata.m"]; @@ -80,7 +82,6 @@ main() o = [a decodeObject]; printf("Decoded data from archive - length %d\n", [o length]); [a release]; - [o release]; [d setCapacity: 2000000]; printf("Set capacity of shared memory item to %d\n", [d capacity]); diff --git a/Testing/nshost.m b/Testing/nshost.m index b326603f9..437ac273f 100644 --- a/Testing/nshost.m +++ b/Testing/nshost.m @@ -26,6 +26,7 @@ main () NSHost* n; NSAutoreleasePool *arp = [NSAutoreleasePool new]; + [NSAutoreleasePool enableDoubleReleaseCheck:YES]; c = [NSHost currentHost]; displayHost(c); n = [NSHost hostWithName:[c name]]; @@ -37,7 +38,6 @@ main () [NSHost setHostCacheEnabled:NO]; - [n release]; n = [NSHost hostWithName:[c name]]; displayHost(n); printf("c:%lx, n:%lx, a:%lx\n", c, n, a);