From b9f80a08cfcd969efa302d34796c1f101acf6d44 Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Mon, 24 May 2004 15:12:21 +0000 Subject: [PATCH] Fixed a leak in status windows. Fixed a timer bug in checking for server. --- MainController.m | 4 ++-- StatusWindow.m | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MainController.m b/MainController.m index 8abe8de..b2b8195 100755 --- a/MainController.m +++ b/MainController.m @@ -1170,7 +1170,7 @@ static MainController *sharedController; [[StatusWindowController sharedController] showNetworkErrorQueryWindow]; if ([self disconnectFromServer]) { [[PreferencesController sharedPrefs] resetRemotePlayerTextFields]; - [NSTimer scheduledTimerWithTimeInterval:90.0 target:self selector:@selector(checkForRemoteServer) userInfo:nil repeats:YES]; + [NSTimer scheduledTimerWithTimeInterval:90.0 target:self selector:@selector(checkForRemoteServer) userInfo:nil repeats:NO]; } else { ITDebugLog(@"CRITICAL ERROR, DISCONNECTING!"); } @@ -1180,7 +1180,7 @@ static MainController *sharedController; - (void)reconnect { if ([self connectToServer] == 0) { - [NSTimer scheduledTimerWithTimeInterval:90.0 target:self selector:@selector(checkForRemoteServer) userInfo:nil repeats:YES]; + [NSTimer scheduledTimerWithTimeInterval:90.0 target:self selector:@selector(checkForRemoteServer) userInfo:nil repeats:NO]; } [[StatusWindow sharedWindow] setLocked:NO]; [[StatusWindow sharedWindow] vanish:self]; diff --git a/StatusWindow.m b/StatusWindow.m index ffbc1e6..c116c09 100755 --- a/StatusWindow.m +++ b/StatusWindow.m @@ -405,8 +405,8 @@ } // Make the buttons, set the titles, and size them to fit their titles - okButton = [[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)]; - cancelButton = [[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)]; + okButton = [[[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)] autorelease]; + cancelButton = [[[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)] autorelease]; [okButton setTarget:target]; [cancelButton setTarget:target]; [okButton setAction:okAction]; -- 2.20.1