Thrift-1340: Add support of ARC to Objective-C
Client: Objective-c
Patch: Hirano Satoshi
Adds -objc-arc flag to compiler and if used removes the retain/release/autorelease from generated code
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210732 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cocoa/src/TSharedProcessorFactory.m b/lib/cocoa/src/TSharedProcessorFactory.m
index b38e73a..a0007c0 100644
--- a/lib/cocoa/src/TSharedProcessorFactory.m
+++ b/lib/cocoa/src/TSharedProcessorFactory.m
@@ -19,6 +19,7 @@
#import "TSharedProcessorFactory.h"
+#import "TObjective-C.h"
@implementation TSharedProcessorFactory
@@ -31,21 +32,21 @@
return nil;
}
- mSharedProcessor = [sharedProcessor retain];
+ mSharedProcessor = [sharedProcessor retain_stub];
return self;
}
- (void) dealloc
{
- [mSharedProcessor release];
- [super dealloc];
+ [mSharedProcessor release_stub];
+ [super dealloc_stub];
}
- (id<TProcessor>) processorForTransport: (id<TTransport>) transport
{
- return [[mSharedProcessor retain] autorelease];
+ return [[mSharedProcessor retain_stub] autorelease_stub];
}
@end