adium 4140:7cc40bc51bc0: Resolve a warning by not overriding an ...
commits at adium.im
commits at adium.im
Fri Aug 12 00:33:31 UTC 2011
details: http://hg.adium.im/adium/rev/7cc40bc51bc0
revision: 4140:7cc40bc51bc0
branch: (none)
author: Evan Schoenberg
date: Thu Aug 11 19:31:37 2011 -0500
Resolve a warning by not overriding an instance method in a category
Subject: adium 4141:5edc24773c94: The category should not override the class's dealloc method; doing so leads to leakage. This was in AIAccount, which we don't dealloc often, so not a huge deal... but do it right nonetheless. Warnings--;
details: http://hg.adium.im/adium/rev/5edc24773c94
revision: 4141:5edc24773c94
branch: (none)
author: Evan Schoenberg
date: Thu Aug 11 19:33:21 2011 -0500
The category should not override the class's dealloc method; doing so leads to leakage. This was in AIAccount, which we don't dealloc often, so not a huge deal... but do it right nonetheless. Warnings--;
diffs (70 lines):
diff -r 30cfdb5bcc9b -r 5edc24773c94 Frameworks/Adium Framework/Source/AIAbstractAccount.m
--- a/Frameworks/Adium Framework/Source/AIAbstractAccount.m Thu Aug 11 19:17:31 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIAbstractAccount.m Thu Aug 11 19:33:21 2011 -0500
@@ -134,26 +134,6 @@
return self;
}
-- (void)dealloc
-{
- [lastDisconnectionError release];
- [delayedUpdateStatusTargets release];
- [delayedUpdateStatusTimer invalidate]; [delayedUpdateStatusTimer release];
-
- /* Our superclass releases internalObjectID in its dealloc, so we should set it to nil when do.
- * We could just depend upon its implementation, but this is more robust.
- */
- [internalObjectID release]; internalObjectID = nil;
-
- [self _stopAttributedRefreshTimer];
- [autoRefreshingKeys release]; autoRefreshingKeys = nil;
-
- [[NSNotificationCenter defaultCenter] removeObserver:self];
- [adium.preferenceController unregisterPreferenceObserver:self];
-
- [super dealloc];
-}
-
- (void)adiumDidLoad:(NSNotification *)inNotification
{
[self updateStatusForKey:KEY_ACCOUNT_DISPLAY_NAME];
diff -r 30cfdb5bcc9b -r 5edc24773c94 Frameworks/Adium Framework/Source/AIAccount.m
--- a/Frameworks/Adium Framework/Source/AIAccount.m Thu Aug 11 19:17:31 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccount.m Thu Aug 11 19:33:21 2011 -0500
@@ -128,7 +128,22 @@
[waitingToReconnect release]; waitingToReconnect = nil;
[connectionProgressString release]; connectionProgressString = nil;
[currentDisplayName release]; currentDisplayName = nil;
-
+
+ [lastDisconnectionError release];
+ [delayedUpdateStatusTargets release];
+ [delayedUpdateStatusTimer invalidate]; [delayedUpdateStatusTimer release];
+
+ /* Our superclass releases internalObjectID in its dealloc, so we should set it to nil when do.
+ * We could just depend upon its implementation, but this is more robust.
+ */
+ [internalObjectID release]; internalObjectID = nil;
+
+ [self _stopAttributedRefreshTimer];
+ [autoRefreshingKeys release]; autoRefreshingKeys = nil;
+
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [adium.preferenceController unregisterPreferenceObserver:self];
+
[super dealloc];
}
diff -r 30cfdb5bcc9b -r 5edc24773c94 Plugins/Bonjour/libezv/Private Classes/AWEzvContactManager.m
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvContactManager.m Thu Aug 11 19:17:31 2011 -0500
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvContactManager.m Thu Aug 11 19:33:21 2011 -0500
@@ -96,9 +96,4 @@
[super dealloc];
}
-- (NSString *)myInstanceName {
- NSAssert(NO, @"AWEzvContactManager -myInstanceName: This should not be reached");
- return nil;
-}
-
@end
More information about the commits
mailing list