THRIFT-2905 Cocoa compiler should have option to produce "modern" Objective-C
Client: Cocoa (ObjectiveC & Swift)
Author: Kevin Wooten <kevin@wooten.com>
This closes #539
diff --git a/lib/cocoa/src/TSharedProcessorFactory.m b/lib/cocoa/src/TSharedProcessorFactory.m
index a0007c0..3d55f47 100644
--- a/lib/cocoa/src/TSharedProcessorFactory.m
+++ b/lib/cocoa/src/TSharedProcessorFactory.m
@@ -19,34 +19,31 @@
#import "TSharedProcessorFactory.h"
-#import "TObjective-C.h"
+
+
+@interface TSharedProcessorFactory ()
+
+@property(strong, nonatomic) id<TProcessor> sharedProcessor;
+
+@end
@implementation TSharedProcessorFactory
-- (id) initWithSharedProcessor: (id<TProcessor>) sharedProcessor
+-(id) initWithSharedProcessor:(id<TProcessor>)sharedProcessor
{
self = [super init];
- if (!self) {
- return nil;
+ if (self) {
+ _sharedProcessor = sharedProcessor;
}
-
- mSharedProcessor = [sharedProcessor retain_stub];
+
return self;
}
-
-- (void) dealloc
+-(id<TProcessor>) processorForTransport:(id<TTransport>)transport
{
- [mSharedProcessor release_stub];
- [super dealloc_stub];
-}
-
-
-- (id<TProcessor>) processorForTransport: (id<TTransport>) transport
-{
- return [[mSharedProcessor retain_stub] autorelease_stub];
+ return _sharedProcessor;
}
@end