From eb283833a9c50bade20f89644c135e863ba90024 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 7 May 2007 00:20:04 +0000 Subject: [PATCH] a little better releasing of timers --- macosx/Controller.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 28d1011fb..cd6014c83 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -506,8 +506,12 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy //stop timers [fTimer invalidate]; [fSpeedLimitTimer invalidate]; - if (fAutoImportTimer && [fAutoImportTimer isValid]) - [fAutoImportTimer invalidate]; + if (fAutoImportTimer) + { + if ([fAutoImportTimer isValid]) + [fAutoImportTimer invalidate]; + [fAutoImportTimer release]; + } //save history and stop running torrents [self updateTorrentHistory];