diff options
author | stuconnolly <stuart02@gmail.com> | 2010-03-16 13:22:06 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-03-16 13:22:06 +0000 |
commit | 392c1e5c5579b1b58e02acddf2880097d9e1e0ce (patch) | |
tree | 34c6a679d610802bf570272fdc3cb04fd2053970 /Source/SPExportController.m | |
parent | 332f6201ce607a6622fadfd3e6426e4571dc035f (diff) | |
download | sequelpro-392c1e5c5579b1b58e02acddf2880097d9e1e0ce.tar.gz sequelpro-392c1e5c5579b1b58e02acddf2880097d9e1e0ce.tar.bz2 sequelpro-392c1e5c5579b1b58e02acddf2880097d9e1e0ce.zip |
Modify our current implementation of all singleton instances to be inline with Apple's recommendations detailed at http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32 This also fixes the associated static analysis warnings of potentially leaked objects.
Diffstat (limited to 'Source/SPExportController.m')
-rw-r--r-- | Source/SPExportController.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m index c1e72b8a..caa504e7 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -449,8 +449,8 @@ [errors appendString:[NSString stringWithFormat:@"%@\n", [connection getLastErrorMessage]]]; } - SPExporter *exporter; - SPCSVExporter *csvExporter; + SPExporter *exporter = nil; + SPCSVExporter *csvExporter = nil; // Based on the type of export create a new instance of the corresponding exporter and set it's specific options switch (type) @@ -508,6 +508,8 @@ // maximum number of concurrent operations. See the docs for more details. [operationQueue addOperation:exporter]; + if (csvExporter) [csvExporter release]; + // Add a spacer to the file //[fileHandle writeData:[[NSString stringWithFormat:@"%@%@%@", csvLineEnd, csvLineEnd, csvLineEnd] dataUsingEncoding:encoding]]; } |