diff options
-rw-r--r-- | objc/test/Ice/dispatcher/AllTests.m | 4 | ||||
-rw-r--r-- | objc/test/Ice/faultTolerance/AllTests.m | 16 | ||||
-rw-r--r-- | objc/test/Ice/hash/AllTests.m | 16 | ||||
-rw-r--r-- | objc/test/Ice/interceptor/InterceptorI.m | 8 | ||||
-rw-r--r-- | objc/test/Ice/invoke/AllTests.m | 8 | ||||
-rw-r--r-- | objc/test/Ice/location/TestI.m | 4 | ||||
-rw-r--r-- | objc/test/Ice/optional/AllTests.m | 12 | ||||
-rw-r--r-- | objc/test/Ice/proxy/TestI.m | 10 |
8 files changed, 19 insertions, 59 deletions
diff --git a/objc/test/Ice/dispatcher/AllTests.m b/objc/test/Ice/dispatcher/AllTests.m index e8998c6d63e..4689a7b4e04 100644 --- a/objc/test/Ice/dispatcher/AllTests.m +++ b/objc/test/Ice/dispatcher/AllTests.m @@ -155,9 +155,7 @@ dispatcherAllTests(id<ICECommunicator> communicator) [testController resumeAdapter]; [result waitForCompleted]; } -#if defined(__clang__) && !__has_feature(objc_arc) - [cb release]; -#endif + ICE_RELEASE(cb); } tprintf("ok\n"); diff --git a/objc/test/Ice/faultTolerance/AllTests.m b/objc/test/Ice/faultTolerance/AllTests.m index c29ae098e3d..767816d2d74 100644 --- a/objc/test/Ice/faultTolerance/AllTests.m +++ b/objc/test/Ice/faultTolerance/AllTests.m @@ -180,9 +180,7 @@ allTests(id<ICECommunicator> communicator, NSArray* ports) int pid = [cb pid]; test(pid != oldPid); oldPid = pid; -#if defined(__clang__) && !__has_feature(objc_arc) - [cb release]; -#endif + ICE_RELEASE(cb); tprintf("ok\n"); } @@ -201,9 +199,7 @@ allTests(id<ICECommunicator> communicator, NSArray* ports) [obj begin_shutdown:^{ [cb shutdownResponse]; } exception:^(ICEException* ex) { [cb shutdownException:ex]; }]; [cb check]; -#if defined(__clang__) && !__has_feature(objc_arc) - [cb release]; -#endif + ICE_RELEASE(cb); tprintf("ok\n"); } } @@ -232,9 +228,7 @@ allTests(id<ICECommunicator> communicator, NSArray* ports) Callback* cb = [[Callback alloc] init]; [obj begin_abort:^{ [cb abortResponse]; } exception:^(ICEException* ex) { [cb abortException:ex]; }]; [cb check]; -#if defined(__clang__) && !__has_feature(objc_arc) - [cb release]; -#endif + ICE_RELEASE(cb); tprintf("ok\n"); } } @@ -264,9 +258,7 @@ allTests(id<ICECommunicator> communicator, NSArray* ports) [obj begin_idempotentAbort:^{ [cb idempotentAbortResponse]; } exception:^(ICEException* ex) { [cb idempotentAbortException:ex]; }]; [cb check]; -#if defined(__clang__) && !__has_feature(objc_arc) - [cb release]; -#endif + ICE_RELEASE(cb); tprintf("ok\n"); } diff --git a/objc/test/Ice/hash/AllTests.m b/objc/test/Ice/hash/AllTests.m index 55ab971897a..79bed007c11 100644 --- a/objc/test/Ice/hash/AllTests.m +++ b/objc/test/Ice/hash/AllTests.m @@ -55,9 +55,7 @@ hashAllTests() } [seenObject removeAllObjects]; [communicator destroy]; -#if defined(__clang__) && !__has_feature(objc_arc) - [seenObject release]; -#endif + ICE_RELEASE(seenObject); tprintf("ok\n"); } @@ -89,9 +87,7 @@ hashAllTests() test(collisions < maxCollisions); } [seenObject removeAllObjects]; -#if defined(__clang__) && !__has_feature(objc_arc) - [seenObject release]; -#endif + ICE_RELEASE(seenObject); } { int collisions = 0; @@ -122,9 +118,7 @@ hashAllTests() test(collisions < maxCollisions); } [seenObject removeAllObjects]; -#if defined(__clang__) && !__has_feature(objc_arc) - [seenObject release]; -#endif + ICE_RELEASE(seenObject); } { @@ -155,9 +149,7 @@ hashAllTests() test(collisions < maxCollisions); } [seenObject removeAllObjects]; -#if defined(__clang__) && !__has_feature(objc_arc) - [seenObject release]; -#endif + ICE_RELEASE(seenObject); } tprintf("ok\n"); } diff --git a/objc/test/Ice/interceptor/InterceptorI.m b/objc/test/Ice/interceptor/InterceptorI.m index 010d26a9676..08bde68b89d 100644 --- a/objc/test/Ice/interceptor/InterceptorI.m +++ b/objc/test/Ice/interceptor/InterceptorI.m @@ -37,9 +37,7 @@ { ICECurrent* current = [request getCurrent]; -#if defined(__clang__) && !__has_feature(objc_arc) - [lastOperation release]; -#endif + ICE_RELEASE(lastOperation); lastOperation = ICE_RETAIN(current.operation); if([lastOperation isEqualToString:@"addWithRetry"]) @@ -85,9 +83,7 @@ -(void) clear { lastStatus = NO; -#if defined(__clang__) && !__has_feature(objc_arc) - [lastOperation release]; -#endif + ICE_RELEASE(lastOperation); lastOperation = nil; } diff --git a/objc/test/Ice/invoke/AllTests.m b/objc/test/Ice/invoke/AllTests.m index 140e9fd2bcf..be9ffffff33 100644 --- a/objc/test/Ice/invoke/AllTests.m +++ b/objc/test/Ice/invoke/AllTests.m @@ -227,9 +227,7 @@ invokeAllTests(id<ICECommunicator> communicator) response:^(BOOL ok, NSMutableData* outEncaps) { [cb opString:ok outEncaps:outEncaps]; } exception:^(ICEException* ex) { test(NO); }]; [cb check]; -#if defined(__clang__) && !__has_feature(objc_arc) - [cb release]; -#endif + ICE_RELEASE(cb); } { @@ -266,9 +264,7 @@ invokeAllTests(id<ICECommunicator> communicator) response:^(BOOL ok, NSMutableData* outP) { [cb opException:ok outEncaps:outP]; } exception:^(ICEException* ex) { test(NO); }]; [cb check]; -#if defined(__clang__) && !__has_feature(objc_arc) - [cb release]; -#endif + ICE_RELEASE(cb); } tprintf("ok\n"); diff --git a/objc/test/Ice/location/TestI.m b/objc/test/Ice/location/TestI.m index 885a3127766..94903f4b652 100644 --- a/objc/test/Ice/location/TestI.m +++ b/objc/test/Ice/location/TestI.m @@ -47,9 +47,7 @@ [c waitForShutdown]; [c destroy]; } -#if defined(__clang__) && !__has_feature(objc_arc) - [communicators_ release]; -#endif + ICE_RELEASE(communicators_); communicators_ = [[NSMutableArray alloc] init]; // diff --git a/objc/test/Ice/optional/AllTests.m b/objc/test/Ice/optional/AllTests.m index 71731ac3bcb..297fce46da2 100644 --- a/objc/test/Ice/optional/AllTests.m +++ b/objc/test/Ice/optional/AllTests.m @@ -180,12 +180,10 @@ -(void) read__:(id<ICEInputStream>)is { -#if defined(__clang__) && !__has_feature(objc_arc) if(f_ != nil) { - [f_ release]; + ICE_RELEASE(f_); } -#endif f_ = [TestOptionalF new]; [is startObject]; [is startSlice]; @@ -768,9 +766,7 @@ optionalAllTests(id<ICECommunicator> communicator) [os startEncapsulation]; ICEObject* d = [DObjectWriter new]; [os writeObject:d]; -#if defined(__clang__) && !__has_feature(objc_arc) - [d release]; -#endif + ICE_RELEASE(d); [os endEncapsulation]; inEncaps = [os finished]; test([initial ice_invoke:@"pingPong" mode:ICENormal inEncaps:inEncaps outEncaps:&outEncaps]); @@ -793,9 +789,7 @@ optionalAllTests(id<ICECommunicator> communicator) [os writeObject:a]; DObjectWriter* writer = [DObjectWriter new]; [ICEObjectHelper writeOpt:writer stream:os tag:1]; -#if defined(__clang__) && !__has_feature(objc_arc) - [writer release]; -#endif + ICE_RELEASE(writer); [os endEncapsulation]; inEncaps = [os finished]; test([initial ice_invoke:@"opClassAndUnknownOptional" mode:ICENormal inEncaps:inEncaps diff --git a/objc/test/Ice/proxy/TestI.m b/objc/test/Ice/proxy/TestI.m index 48ce01642d5..b7eee6797b7 100644 --- a/objc/test/Ice/proxy/TestI.m +++ b/objc/test/Ice/proxy/TestI.m @@ -32,18 +32,12 @@ -(ICEContext*) getContext:(ICECurrent*)c { -#if defined(__clang__) && !__has_feature(objc_arc) - return [[_ctx retain] autorelease]; -#else - return _ctx; -#endif + return ICE_AUTORELEASE(ICE_RETAIN(_ctx)); } -(BOOL) ice_isA:(NSString*)s current:(ICECurrent*)current { -#if defined(__clang__) && !__has_feature(objc_arc) - [_ctx release]; -#endif + ICE_RELEASE(_ctx); _ctx = ICE_RETAIN([current ctx]); return [super ice_isA:s current:current]; } |