From c2351f2220ac01cac614de93bad05022d89d7790 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 23 Mar 2010 21:08:33 +0000 Subject: - Remove observers for key paths when dealloc'ing objects to fix later crashes when changing those keyvalues (eg changing query editor background colour after closing windows - http://log.sequelpro.com/view/44 ) - Fix a memory leak of a prefs reference in CMTextView --- Source/SPConnectionController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/SPConnectionController.m') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 869bd35c..7e84a7f0 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -125,7 +125,8 @@ } - (void) dealloc -{ +{ + [prefs removeObserver:self forKeyPath:SPFavorites]; [keychain release]; [prefs release]; if (favorites) [favorites release]; -- cgit v1.2.3