aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldMapperController.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-01-04 03:57:26 +0100
committerMax <post@wickenrode.com>2015-01-04 03:57:26 +0100
commit2735e15bf5d4b3a976435ebb29ca9073de0e5071 (patch)
treee2088e442aa2d100ceafd8c0c4789e033fd12ac3 /Source/SPFieldMapperController.m
parentdb64bd1b5affd00332906901ee57d6f681faf7ea (diff)
downloadsequelpro-2735e15bf5d4b3a976435ebb29ca9073de0e5071.tar.gz
sequelpro-2735e15bf5d4b3a976435ebb29ca9073de0e5071.tar.bz2
sequelpro-2735e15bf5d4b3a976435ebb29ca9073de0e5071.zip
Formalize [x release], x = nil; convention
Take this commit as a proposal to formalize our existing "[x release], x = nil;" convention by introducing a macro for it. Feel free to revert this commit if you see issues with the approch or implementation.
Diffstat (limited to 'Source/SPFieldMapperController.m')
-rw-r--r--Source/SPFieldMapperController.m32
1 files changed, 16 insertions, 16 deletions
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m
index 418a255f..9bef9d03 100644
--- a/Source/SPFieldMapperController.m
+++ b/Source/SPFieldMapperController.m
@@ -219,20 +219,20 @@ static NSUInteger SPSourceColumnTypeInteger = 1;
- (void)dealloc
{
- if (mySQLConnection) [mySQLConnection release], mySQLConnection = nil;
- if (sourcePath) [sourcePath release], sourcePath = nil;
- if (fieldMappingTableColumnNames) [fieldMappingTableColumnNames release], fieldMappingTableColumnNames = nil;
- if (defaultFieldTypesForComboBox) [defaultFieldTypesForComboBox release], defaultFieldTypesForComboBox = nil;
- if (fieldMappingTableTypes) [fieldMappingTableTypes release], fieldMappingTableTypes = nil;
- if (fieldMappingArray) [fieldMappingArray release], fieldMappingArray = nil;
- if (fieldMappingButtonOptions) [fieldMappingButtonOptions release], fieldMappingButtonOptions = nil;
- if (fieldMappingOperatorOptions) [fieldMappingOperatorOptions release], fieldMappingOperatorOptions = nil;
- if (fieldMappingOperatorArray) [fieldMappingOperatorArray release], fieldMappingOperatorArray = nil;
- if (fieldMappingGlobalValues) [fieldMappingGlobalValues release], fieldMappingGlobalValues = nil;
- if (fieldMappingGlobalValuesSQLMarked) [fieldMappingGlobalValuesSQLMarked release], fieldMappingGlobalValuesSQLMarked = nil;
- if (fieldMappingTableDefaultValues) [fieldMappingTableDefaultValues release], fieldMappingTableDefaultValues = nil;
- if (primaryKeyFields) [primaryKeyFields release], primaryKeyFields = nil;
- if (toBeEditedRowIndexes) [toBeEditedRowIndexes release], toBeEditedRowIndexes = nil;
+ if (mySQLConnection) SPClear(mySQLConnection);
+ if (sourcePath) SPClear(sourcePath);
+ if (fieldMappingTableColumnNames) SPClear(fieldMappingTableColumnNames);
+ if (defaultFieldTypesForComboBox) SPClear(defaultFieldTypesForComboBox);
+ if (fieldMappingTableTypes) SPClear(fieldMappingTableTypes);
+ if (fieldMappingArray) SPClear(fieldMappingArray);
+ if (fieldMappingButtonOptions) SPClear(fieldMappingButtonOptions);
+ if (fieldMappingOperatorOptions) SPClear(fieldMappingOperatorOptions);
+ if (fieldMappingOperatorArray) SPClear(fieldMappingOperatorArray);
+ if (fieldMappingGlobalValues) SPClear(fieldMappingGlobalValues);
+ if (fieldMappingGlobalValuesSQLMarked) SPClear(fieldMappingGlobalValuesSQLMarked);
+ if (fieldMappingTableDefaultValues) SPClear(fieldMappingTableDefaultValues);
+ if (primaryKeyFields) SPClear(primaryKeyFields);
+ if (toBeEditedRowIndexes) SPClear(toBeEditedRowIndexes);
[super dealloc];
}
@@ -605,7 +605,7 @@ static NSUInteger SPSourceColumnTypeInteger = 1;
// Update the table view
fieldMappingCurrentRow = 0;
- if (fieldMappingArray) [fieldMappingArray release], fieldMappingArray = nil;
+ if (fieldMappingArray) SPClear(fieldMappingArray);
[self setupFieldMappingArray];
[rowDownButton setEnabled:NO];
[rowUpButton setEnabled:([fieldMappingImportArray count] > 1)];
@@ -912,7 +912,7 @@ static NSUInteger SPSourceColumnTypeInteger = 1;
// Update the table view
fieldMappingCurrentRow = 0;
- if (fieldMappingArray) [fieldMappingArray release], fieldMappingArray = nil;
+ if (fieldMappingArray) SPClear(fieldMappingArray);
[self setupFieldMappingArray];
[rowDownButton setEnabled:NO];
[rowUpButton setEnabled:([fieldMappingImportArray count] > 1)];