diff options
Diffstat (limited to 'macosx/HBDistributedArray.m')
-rw-r--r-- | macosx/HBDistributedArray.m | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/macosx/HBDistributedArray.m b/macosx/HBDistributedArray.m index aef8dc4be..a8764cfbb 100644 --- a/macosx/HBDistributedArray.m +++ b/macosx/HBDistributedArray.m @@ -18,8 +18,8 @@ - (instancetype)initWithObject:(id)object; -@property (nonatomic, retain) id representedObject; -@property (nonatomic, readonly) NSString *uuid; +@property (nonatomic, strong) id representedObject; +@property (unsafe_unretained, nonatomic, readonly) NSString *uuid; @end @@ -27,17 +27,11 @@ - (instancetype)initWithObject:(id)object { - _representedObject = [object retain]; + _representedObject = object; return self; } -- (void)dealloc -{ - [_representedObject release]; - [super dealloc]; -} - - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { return [self.representedObject methodSignatureForSelector:selector]; @@ -113,20 +107,13 @@ NSString *HBDistributedArraWrittenToDisk = @"HBDistributedArraWrittenToDisk"; - (void)dealloc { + [[NSDistributedNotificationCenter defaultCenter] removeObserver:self]; + [self lock]; [self synchronize]; [self unlock]; - [_fileURL release]; - _fileURL = nil; - [_array release]; - _array = nil; - - [[NSDistributedNotificationCenter defaultCenter] removeObserver:self]; - sem_close(_mutex); - - [super dealloc]; } - (void)lock @@ -277,7 +264,7 @@ NSString *HBDistributedArraWrittenToDisk = @"HBDistributedArraWrittenToDisk"; } else { - return [[[HBProxyArrayObject alloc] initWithObject:anObject] autorelease]; + return [[HBProxyArrayObject alloc] initWithObject:anObject]; } } |