From a49f7140df2910a998241af13d9539aa9ad4161c Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 1 Sep 2010 00:47:52 +0000 Subject: - Ensure previous outstanding performSelector: requests are cancelled to avoid calls on released objects; this addresses http://spbug.com/l/1408, http://spbug.com/l/254 and http://spbug.com/l/781 --- Source/SPTableContent.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/SPTableContent.m') diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index e2b1a0de..b57678e5 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -3896,6 +3896,10 @@ - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; + + // Cancel previous performSelector: requests on ourselves and the table view + // to prevent crashes for deferred actions + [NSObject cancelPreviousPerformRequestsWithTarget:self]; [NSObject cancelPreviousPerformRequestsWithTarget:tableContentView]; [self clearTableLoadTimer]; -- cgit v1.2.3