avoid warnings about missing autorelease pool

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27256 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-12-08 08:43:07 +00:00
parent 2b296165b4
commit a115756538

View file

@ -9,6 +9,7 @@ static NSArray *array;
@implementation SyncTest @implementation SyncTest
- (void) sayHello - (void) sayHello
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSLog(@"Before the sync block %s\n",[[[NSThread currentThread] description] cString]); NSLog(@"Before the sync block %s\n",[[[NSThread currentThread] description] cString]);
@synchronized(array) { @synchronized(array) {
NSLog(@"In the sync block %s:%d\n",[[[NSThread currentThread] description] cString], [NSThread isMainThread]); NSLog(@"In the sync block %s:%d\n",[[[NSThread currentThread] description] cString], [NSThread isMainThread]);
@ -17,6 +18,7 @@ static NSArray *array;
NSLog(@"Done waiting\n"); NSLog(@"Done waiting\n");
} }
NSLog(@"After the sync block %s\n",[[[NSThread currentThread] description] cString]); NSLog(@"After the sync block %s\n",[[[NSThread currentThread] description] cString]);
[pool release];
} }
@end @end