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/HBAudio.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/HBAudio.m')
-rw-r--r-- | macosx/HBAudio.m | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index 52d52f230..c58156443 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -19,8 +19,8 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; @interface HBAudio () <HBAudioTrackDataSource, HBAudioTrackDelegate> -@property (nonatomic, readonly) NSDictionary *noneTrack; -@property (nonatomic, readonly) NSArray *masterTrackArray; // the master list of audio tracks from the title +@property (nonatomic, readonly, strong) NSDictionary *noneTrack; +@property (nonatomic, readonly, strong) NSArray *masterTrackArray; // the master list of audio tracks from the title @property (nonatomic, readwrite) int container; // initially is the default HB_MUX_MP4 @@ -38,9 +38,9 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; _tracks = [[NSMutableArray alloc] init]; _defaults = [[HBAudioDefaults alloc] init]; - _noneTrack = [@{keyAudioTrackIndex: @0, + _noneTrack = @{keyAudioTrackIndex: @0, keyAudioTrackName: NSLocalizedString(@"None", @"None"), - keyAudioInputCodec: @0} retain]; + keyAudioInputCodec: @0}; NSMutableArray *sourceTracks = [NSMutableArray array]; [sourceTracks addObject:_noneTrack]; @@ -52,23 +52,6 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; return self; } -- (void)dealloc -{ - [_tracks release]; - _tracks = nil; - - [_defaults release]; - _defaults = nil; - - [_noneTrack release]; - _noneTrack = nil; - - [_masterTrackArray release]; - _masterTrackArray = nil; - - [super dealloc]; -} - - (void)addAllTracks { [self addTracksFromDefaults:YES]; @@ -172,7 +155,6 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; { [self removeObjectFromTracksAtIndex: [self countOfTracks] - 1]; } - [newAudio release]; if (firstOnly) { @@ -245,7 +227,6 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; firstTrack = self.defaults.secondaryEncoderMode ? YES : NO; [tracksAdded addIndexes:tracksIndexes]; } - [tracksIndexes release]; } // If no preferred Language was found, add standard track 1 @@ -296,7 +277,6 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; [newAudio setTrack: self.noneTrack]; [newAudio setDrc: @0.0f]; [newAudio setGain: @0.0f]; - [newAudio release]; } #pragma mark - @@ -382,7 +362,7 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification"; HBAudioTrack *trackCopy = [obj copy]; trackCopy.dataSource = copy; trackCopy.delegate = copy; - [copy->_tracks addObject:[trackCopy autorelease]]; + [copy->_tracks addObject:trackCopy]; } }]; |