Changeset 13249


Ignore:
Timestamp:
Mar 10, 2012, 1:36:26 PM (9 years ago)
Author:
livings124
Message:

less crashing with ARC

Location:
trunk/macosx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/BlocklistDownloaderViewController.m

    r13248 r13249  
    3838@implementation BlocklistDownloaderViewController
    3939
    40 #warning make gcd singleton
     40#warning make gcd singleton?
     41BlocklistDownloaderViewController * fDLViewController = nil;
    4142+ (void) downloadWithPrefsController: (PrefsController *) prefsController
    4243{
    43     BlocklistDownloaderViewController * downloader = [[BlocklistDownloaderViewController alloc] initWithPrefsController: prefsController];
    44     [downloader startDownload];
     44    if (!fDLViewController)
     45    {
     46        fDLViewController = [[BlocklistDownloaderViewController alloc] initWithPrefsController: prefsController];
     47        [fDLViewController startDownload];
     48    }
    4549}
    4650
     
    103107    [fStatusWindow orderOut: self];
    104108   
     109    fDLViewController = nil;
    105110}
    106111
     
    149154{
    150155    [[alert window] orderOut: self];
     156   
     157    fDLViewController = nil;
    151158}
    152159
  • trunk/macosx/BonjourController.m

    r13248 r13249  
    2727@implementation BonjourController
    2828
    29 #warning make gcd singleton
    3029BonjourController * fDefaultController = nil;
    3130+ (BonjourController *) defaultController
    3231{
    33     if (!fDefaultController)
     32    static dispatch_once_t onceToken;
     33    dispatch_once(&onceToken, ^{
    3434        fDefaultController = [[BonjourController alloc] init];
     35    });
     36   
    3537    return fDefaultController;
    3638}
  • trunk/macosx/PeerProgressIndicatorCell.m

    r13248 r13249  
    2626#import "NSStringAdditions.h"
    2727
    28 #import "transmission.h" // required by utils.h
    29 #import "utils.h"
    30 
    3128@implementation PeerProgressIndicatorCell
    3229
     
    5451    {
    5552        //attributes not needed anymore
    56         if (fAttributes)
    57         {
    58             fAttributes = nil;
    59         }
     53        fAttributes = nil;
    6054       
    6155        [super drawWithFrame: cellFrame inView: controlView];
  • trunk/macosx/ProgressGradients.m

    r13248 r13249  
    3939                        alpha: alpha];
    4040   
    41     NSGradient * progressGradient = [[NSGradient alloc] initWithColorsAndLocations: baseColor, 0.0, color2, 0.5, color3, 0.5,
    42                                         baseColor, 1.0, nil];
    43     return progressGradient;
     41    return [[NSGradient alloc] initWithColorsAndLocations: baseColor, 0.0, color2, 0.5, color3, 0.5, baseColor, 1.0, nil];
    4442}
    4543
  • trunk/macosx/TorrentTableView.m

    r13248 r13249  
    9090{
    9191    [[NSNotificationCenter defaultCenter] removeObserver: self];
    92    
    93    
    94    
    95    
    96    
    9792}
    9893
Note: See TracChangeset for help on using the changeset viewer.