From 688345df80bb228e9c26b13ccec0710850223123 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 12 Apr 2010 22:01:44 +0000 Subject: 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 --- Source/TableDocument.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source/TableDocument.m') 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]; -- cgit v1.2.3