diff --git a/Tests/base/NSKVOSupport/userdefaults.m b/Tests/base/NSKVOSupport/userdefaults.m index 711c98e0f..5bcdb168b 100644 --- a/Tests/base/NSKVOSupport/userdefaults.m +++ b/Tests/base/NSKVOSupport/userdefaults.m @@ -3,6 +3,7 @@ #import #import #import +#import #import #import @@ -70,6 +71,7 @@ - (void)dealloc int main(int argc, char *argv[]) { + NSAutoreleasePool *pool = [NSAutoreleasePool new]; NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; Observer *obs = [Observer new]; NSString *key1 = @"key1"; @@ -164,6 +166,8 @@ - (void)dealloc [defs removeObserver:obs forKeyPath:key1]; [defs removeObserver:obs forKeyPath:key2]; + [pool drain]; [obs release]; + return 0; }