diff options
author | ritsuka <[email protected]> | 2015-03-17 13:56:21 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-03-17 13:56:21 +0000 |
commit | 48a9e546878ae074202e0301f428193b7915d68f (patch) | |
tree | cf3f0f270fc8c7430dec870e954c826926c02a60 /macosx/HBDistributedArray.m | |
parent | 220bd888e05696acbe1dd47f96ded78c389fc27f (diff) |
MacGui: convert the mac gui to Objective-C ARC.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6996 b64f7644-9d1e-0410-96f1-a4d463321fa5
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]; } } |