diff options
author | Max <post@wickenrode.com> | 2015-01-04 21:15:43 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-01-04 21:15:43 +0100 |
commit | e201531daa71ee1a2e2a0f927c619947126c9d3d (patch) | |
tree | 9b43cecf579b4318ec9b8f04c970a40c3232ba15 /Source/SPTableContent.m | |
parent | 5b55d8c4d24b0c24a5dc74a49cfd70448146d582 (diff) | |
download | sequelpro-e201531daa71ee1a2e2a0f927c619947126c9d3d.tar.gz sequelpro-e201531daa71ee1a2e2a0f927c619947126c9d3d.tar.bz2 sequelpro-e201531daa71ee1a2e2a0f927c619947126c9d3d.zip |
Addition to commit 2735e15b
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r-- | Source/SPTableContent.m | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index b0d0f03c..9295c858 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -462,7 +462,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper #endif // Reset sort column - if (sortCol) [sortCol release]; sortCol = nil; + if (sortCol) SPClear(sortCol); isDesc = NO; // Empty and disable filter options @@ -697,8 +697,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper // Otherwise, clear sorting } else { if (sortCol) { - [sortCol release]; - sortCol = nil; + SPClear(sortCol); } isDesc = NO; } @@ -1372,8 +1371,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper { if (tableLoadTimer) { [tableLoadTimer invalidate]; - [tableLoadTimer release]; - tableLoadTimer = nil; + SPClear(tableLoadTimer); } } @@ -1678,8 +1676,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper // this is the same as saying (isDesc && !invert) || (!isDesc && invert) if (isDesc != invert) { - [sortCol release]; - sortCol = nil; + SPClear(sortCol); } else { isDesc = !isDesc; @@ -3494,8 +3491,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper } if(fieldEditor) { - [fieldEditor release]; - fieldEditor = nil; + SPClear(fieldEditor); } [[tableContentView window] makeFirstResponder:tableContentView]; @@ -4314,34 +4310,35 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper if(fieldEditor) SPClear(fieldEditor); [self clearTableLoadTimer]; - [tableLoadingCondition release]; - [tableValues release]; + SPClear(tableLoadingCondition); + SPClear(tableValues); pthread_mutex_destroy(&tableValuesLock); - [dataColumns release]; - [oldRow release]; + SPClear(dataColumns); + SPClear(oldRow); #ifndef SP_CODA for (id retainedObject in nibObjectsToRelease) [retainedObject release]; - [nibObjectsToRelease release]; - [paginationPopover release]; + SPClear(nibObjectsToRelease); + SPClear(paginationPopover); - [filterTableData release]; - if (lastEditedFilterTableValue) [lastEditedFilterTableValue release]; - if (filterTableDefaultOperator) [filterTableDefaultOperator release]; + SPClear(filterTableData); + if (lastEditedFilterTableValue) SPClear(lastEditedFilterTableValue); + if (filterTableDefaultOperator) SPClear(filterTableDefaultOperator); #endif - if (selectedTable) [selectedTable release]; - if (contentFilters) [contentFilters release]; - if (numberOfDefaultFilters) [numberOfDefaultFilters release]; - if (keys) [keys release]; - if (sortCol) [sortCol release]; - [usedQuery release]; - if (sortColumnToRestore) [sortColumnToRestore release]; - if (selectionToRestore) [selectionToRestore release]; + if (selectedTable) SPClear(selectedTable); + if (contentFilters) SPClear(contentFilters); + if (numberOfDefaultFilters) SPClear(numberOfDefaultFilters); + if (keys) SPClear(keys); + if (sortCol) SPClear(sortCol); + SPClear(usedQuery); + if (sortColumnToRestore) SPClear(sortColumnToRestore); + if (selectionToRestore) SPClear(selectionToRestore); + if (cqColumnDefinition) SPClear(cqColumnDefinition); + if (filterFieldToRestore) filterFieldToRestore = nil; if (filterComparisonToRestore) filterComparisonToRestore = nil; if (filterValueToRestore) filterValueToRestore = nil; if (firstBetweenValueToRestore) firstBetweenValueToRestore = nil; if (secondBetweenValueToRestore) secondBetweenValueToRestore = nil; - if (cqColumnDefinition) [cqColumnDefinition release]; [super dealloc]; } |