aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-04-12 22:01:44 +0000
committerrowanbeentje <rowan@beent.je>2010-04-12 22:01:44 +0000
commit688345df80bb228e9c26b13ccec0710850223123 (patch)
tree8ffc579b020361c25bc9d3a4f484544d8d736de9 /Source/TableDocument.m
parentbc1f5c488f532023c5ebb545449e05409b19cded (diff)
downloadsequelpro-688345df80bb228e9c26b13ccec0710850223123.tar.gz
sequelpro-688345df80bb228e9c26b13ccec0710850223123.tar.bz2
sequelpro-688345df80bb228e9c26b13ccec0710850223123.zip
Review usage of notifications, afterDelay: and waitUntilDone:NO calls:
- Add more calls to deregister watchers to fix crashes to closing threads or objects - Fix a couple of memory leaks - Alter a few calls to be performed on main thread (afterDelay: operates on the thread is is called on) - this fixed database reloading after import and field/index deletion error sheets
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 71c581bf..b0465c0b 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -1282,7 +1282,8 @@
* Sets the task progress indicator back to indeterminate (also performed
* automatically whenever a new task is started).
* This can optionally be called with afterDelay set, in which case the intederminate
- * switch will be made a fter a short pause to minimise flicker for short actions.
+ * switch will be made after a short pause to minimise flicker for short actions.
+ * Should be called on the main thread.
*/
- (void) setTaskProgressToIndeterminateAfterDelay:(BOOL)afterDelay
{
@@ -4050,6 +4051,8 @@
[prefs removeObserver:self forKeyPath:SPConsoleEnableLogging];
if (processListController) [prefs removeObserver:processListController forKeyPath:SPDisplayTableViewVerticalGridlines];
if (serverVariablesController) [prefs removeObserver:serverVariablesController forKeyPath:SPDisplayTableViewVerticalGridlines];
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [NSObject cancelPreviousPerformRequestsWithTarget:self];
[_encoding release];
[allDatabases release];