diff options
author | mltownsend <mltownsend@gmail.com> | 2009-10-29 23:40:09 +0000 |
---|---|---|
committer | mltownsend <mltownsend@gmail.com> | 2009-10-29 23:40:09 +0000 |
commit | 8287fc2305b38fdb3ecfa8ad5eef09cd745b80c9 (patch) | |
tree | 9051075a56709d0a63f96338e790a1907f54639f /Source/TableDocument.m | |
parent | c965c29b6ccf39a96a192f5c4bfffa2c0620cefc (diff) | |
download | sequelpro-8287fc2305b38fdb3ecfa8ad5eef09cd745b80c9.tar.gz sequelpro-8287fc2305b38fdb3ecfa8ad5eef09cd745b80c9.tar.bz2 sequelpro-8287fc2305b38fdb3ecfa8ad5eef09cd745b80c9.zip |
Got rid of a crash when using the User Manager and closing last Table Document. May be leaking now, not sure. Still needs some work.
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 9b00d82b..6cbccd60 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -260,7 +260,7 @@ NSData *pData = [NSData dataWithContentsOfFile:path options:NSUncachedRead error:&readError]; spf = [[NSPropertyListSerialization propertyListFromData:pData - mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain]; + mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] autorelease]; if(!spf || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) { NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while reading connection data file", @"error while reading connection data file")] @@ -484,7 +484,6 @@ [spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"auto_connect"]; [connectionController initiateConnection:self]; } - } /** @@ -640,11 +639,6 @@ [tableDataInstance setConnection:mySQLConnection]; [extendedTableInfoInstance setConnection:mySQLConnection]; [databaseDataInstance setConnection:mySQLConnection]; - - if (!userManagerInstance) { - userManagerInstance = [[SPUserManager alloc] initWithConnection:mySQLConnection]; - } - userManagerInstance.mySqlConnection = mySQLConnection; // Set the cutom query editor's MySQL version @@ -739,8 +733,7 @@ NSPrintPanel *printPanel = [op printPanel]; [printPanel setOptions:[printPanel options] + NSPrintPanelShowsOrientation + NSPrintPanelShowsScaling + NSPrintPanelShowsPaperSize]; - SPPrintAccessory *printAccessory = [[SPPrintAccessory alloc] init]; - [printAccessory initWithNibName:@"PrintAccessory" bundle:nil]; + SPPrintAccessory *printAccessory = [[SPPrintAccessory alloc] initWithNibName:@"PrintAccessory" bundle:nil]; [printAccessory setPrintView:printWebView]; [printPanel addAccessoryController:printAccessory]; @@ -2415,6 +2408,7 @@ format:NSPropertyListXMLFormat_v1_0 errorDescription:&err]; + [spf release]; if(err != nil) { NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while converting connection data", @"error while converting connection data")] defaultButton:NSLocalizedString(@"OK", @"OK button") @@ -3551,7 +3545,6 @@ if (taskDrawTimer) [taskDrawTimer release]; if(queryEditorInitString) [queryEditorInitString release]; if(spfSession) [spfSession release]; - if(userManagerInstance) [userManagerInstance release]; if(spfDocData) [spfDocData release]; if(keyChainID) [keyChainID release]; [super dealloc]; |