Changeset 1412

Show
Ignore:
Timestamp:
08/02/04 22:53:49 (4 years ago)
Author:
morris
Message:

retain _console, it's needed in the thread and we might hit a race condition

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCConnection.m

    r1384 r1412  
    1 /* $Id: WCConnection.m,v 1.22 2004/07/28 09:12:58 morris Exp $ */ 
     1/* $Id: WCConnection.m,v 1.23 2004/08/02 20:53:49 morris Exp $ */ 
    22 
    33/* 
     
    8888        _serverInfo     = [(WCServerInfo *) [WCServerInfo alloc] initWithConnection:self]; 
    8989        _transfers      = [(WCTransfers *) [WCTransfers alloc] initWithConnection:self]; 
    90  
     90         
    9191        // --- initiate data controllers 
    9292        _error          = [(WCError *) [WCError alloc] initWithConnection:self]; 
     
    156156                         object:NULL]; 
    157157         
     158        // --- we need these in the threads 
     159        [_console retain]; 
     160         
    158161        // --- start connection 
    159162        [NSThread detachNewThreadSelector:@selector(serverThread:) toTarget:self withObject:NULL]; 
     
    205208        [_tracker release]; 
    206209         
     210        [_console release]; 
     211         
    207212        [super dealloc]; 
    208213} 
     
    240245 
    241246        [_timer invalidate]; 
    242  
     247         
    243248        [self release]; 
    244249} 
     
    984989                                object:[NSArray arrayWithObjects:self, argument, NULL]]; 
    985990                        break; 
    986                                         
     991                 
    987992                default: 
    988993                        color = [NSColor redColor];