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/protocol/TBinaryProtocol.m b/lib/cocoa/src/protocol/TBinaryProtocol.m
index b272716..f269aaa 100644
--- a/lib/cocoa/src/protocol/TBinaryProtocol.m
+++ b/lib/cocoa/src/protocol/TBinaryProtocol.m
@@ -19,6 +19,7 @@
#import "TBinaryProtocol.h"
#import "TProtocolException.h"
+#import "TObjective-C.h"
int32_t VERSION_1 = 0x80010000;
int32_t VERSION_MASK = 0xffff0000;
@@ -56,7 +57,7 @@
strictWrite: (BOOL) strictWrite
{
self = [super init];
- mTransport = [transport retain];
+ mTransport = [transport retain_stub];
mStrictRead = strictRead;
mStrictWrite = strictWrite;
return self;
@@ -77,8 +78,8 @@
- (void) dealloc
{
- [mTransport release];
- [super dealloc];
+ [mTransport release_stub];
+ [super dealloc_stub];
}