adium-1.4 3613:4d7607e78f81: Fixed the last retain-loop I found ...
commits at adium.im
commits at adium.im
Sun Aug 21 21:16:16 UTC 2011
details: http://hg.adium.im/adium-1.4/rev/4d7607e78f81
revision: 3613:4d7607e78f81
branch: (none)
author: Evan Schoenberg
date: Sun Aug 21 16:15:48 2011 -0500
Fixed the last retain-loop I found for AIChat; AIChat once more deallocates properly. Also, fixed behavior of removeAllParticipatingContactsSilently to work even if the chat isn't closing (though when we use it, it currently is... this is just less fragile).
(transplanted from 80d30fd0e0d8ea348312ae9da11f0579a4ff0537)
diffs (34 lines):
diff -r b01904677149 -r 4d7607e78f81 Frameworks/Adium Framework/Source/AIChat.m
--- a/Frameworks/Adium Framework/Source/AIChat.m Sun Aug 21 15:53:56 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIChat.m Sun Aug 21 16:15:48 2011 -0500
@@ -282,7 +282,7 @@
- (void)setDisplayName:(NSString *)inDisplayName
{
[[self displayArrayForKey:@"Display Name"] setObject:inDisplayName
- withOwner:self
+ withOwner:[NSValue valueWithNonretainedObject:self] /* Don't want a retain loop */
priorityLevel:Highest_Priority];
//The display array doesn't cause an attribute update; fake it.
@@ -696,6 +696,10 @@
- (void)removeAllParticipatingContactsSilently
{
+ [participatingContacts removeAllObjects];
+ [participatingContactsFlags removeAllObjects];
+ [participatingContactsAliases removeAllObjects];
+
for (AIListContact *listContact in self) {
if (listContact.isStranger &&
![adium.chatController existingChatWithContact:listContact.parentContact] &&
@@ -704,10 +708,6 @@
}
}
- [participatingContacts removeAllObjects];
- [participatingContactsFlags removeAllObjects];
- [participatingContactsAliases removeAllObjects];
-
[[NSNotificationCenter defaultCenter] postNotificationName:Chat_ParticipatingListObjectsChanged
object:self];
}
More information about the commits
mailing list