Changeset 74

Show
Ignore:
Timestamp:
12/27/05 14:38:08 (3 years ago)
Author:
mrowe
Message:

Rename SSHKey's fullpath to fullPath for consistency, and add -[SSHKey dealloc] to ensure fullPath isn't leaked. Closes #35.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Libs/SSHKey.h

    r3 r74  
    77@interface SSHKey : NSObject  
    88{ 
    9         NSString *fullpath; 
     9        NSString *fullPath; 
    1010        int type; 
    1111} 
  • trunk/Libs/SSHKey.m

    r28 r74  
    2121        } 
    2222 
    23         fullpath = [[NSString stringWithString:thePath] retain]; 
     23        fullPath = [thePath copy]; 
    2424 
    2525        /* Read the file and determine what type we're working with. */ 
    26         handle = [NSFileHandle fileHandleForReadingAtPath:fullpath]; 
     26        handle = [NSFileHandle fileHandleForReadingAtPath:fullPath]; 
    2727        lines = [[[[NSString alloc] initWithData:[handle availableData] encoding:NSASCIIStringEncoding] autorelease] componentsSeparatedByString:@"\n"]; 
    2828 
     
    3737 
    3838        return self; 
     39} 
     40 
     41- (void) dealloc 
     42{ 
     43        [fullPath release]; 
     44        [super dealloc]; 
    3945} 
    4046 
     
    7177- (NSString *)path 
    7278{ 
    73         return fullpath; 
     79        return fullPath; 
    7480} 
    7581