adium 2591:2817a03cf25e: Baleeted spare, build-breaking #endif d...
commits at adium.im
commits at adium.im
Wed Aug 12 07:45:02 UTC 2009
details: http://hg.adium.im/adium/rev/2817a03cf25e
revision: 2591:2817a03cf25e
author: Peter Hosey <hg at boredzo.org>
date: Wed Aug 12 00:35:10 2009 -0700
Baleeted spare, build-breaking #endif directive introduced in 1d6f8c627d2d.
Subject: adium 2592:cfd0dfdbbb54: Make AMPurpleJabberNode's delegates property not retain the delegates. This fixes cyclic retention with the discovery browser.
details: http://hg.adium.im/adium/rev/cfd0dfdbbb54
revision: 2592:cfd0dfdbbb54
author: Peter Hosey <hg at boredzo.org>
date: Wed Aug 12 00:42:45 2009 -0700
Make AMPurpleJabberNode's delegates property not retain the delegates. This fixes cyclic retention with the discovery browser.
diffs (54 lines):
diff -r 34bbe221bb80 -r cfd0dfdbbb54 Plugins/Purple Service/AMPurpleJabberNode.m
--- a/Plugins/Purple Service/AMPurpleJabberNode.m Tue Aug 11 23:51:29 2009 -0700
+++ b/Plugins/Purple Service/AMPurpleJabberNode.m Wed Aug 12 00:42:45 2009 -0700
@@ -21,6 +21,12 @@
@property (readwrite, retain, nonatomic) NSArray *itemsArray;
@end
+static CFArrayCallBacks nonretainingArrayCallbacks = {
+ .version = 0,
+ .copyDescription = (CFArrayCopyDescriptionCallBack)CFCopyDescription,
+ .equal = (CFArrayEqualCallBack)CFEqual,
+};
+
@implementation AMPurpleJabberNode
static void AMPurpleJabberNode_received_data_cb(PurpleConnection *gc, xmlnode **packet, gpointer this) {
@@ -131,7 +137,7 @@
name:queryName ? [NSString stringWithUTF8String:queryName] : nil
connection:self.gc];
// propagate delegates
- newnode.delegates = [[self.delegates mutableCopy] autorelease];
+ newnode.delegates = [NSMakeCollectable(CFArrayCreateMutableCopy(kCFAllocatorDefault, /*capacity*/ 0, (CFArrayRef)self.delegates)) autorelease];
[newItems addObject:newnode];
// check if we're a conference service
if ([[self jid] rangeOfString:@"@"].location == NSNotFound) { // we can't be one when we have an @
@@ -173,7 +179,7 @@
self.node = _node;
self.name = _name;
self.gc = _gc;
- self.delegates = [NSMutableArray array];
+ self.delegates = [NSMakeCollectable(CFArrayCreateMutable(kCFAllocatorDefault, /*capacity*/ 0, &nonretainingArrayCallbacks)) autorelease];
purple_signal_connect(jabber, "jabber-receiving-xmlnode", self,
PURPLE_CALLBACK(AMPurpleJabberNode_received_data_cb), self);
@@ -197,7 +203,7 @@
copy.name = self.name;
copy.gc = self.gc;
- copy.delegates = [NSMutableArray array];
+ copy.delegates = [NSMakeCollectable(CFArrayCreateMutable(kCFAllocatorDefault, /*capacity*/ 0, &nonretainingArrayCallbacks)) autorelease];
copy.features = self.features;
copy.identities = self.identities;
copy.itemsArray = self.itemsArray;
diff -r 34bbe221bb80 -r cfd0dfdbbb54 Plugins/Purple Service/ESPurpleYahooAccount.m
--- a/Plugins/Purple Service/ESPurpleYahooAccount.m Tue Aug 11 23:51:29 2009 -0700
+++ b/Plugins/Purple Service/ESPurpleYahooAccount.m Wed Aug 12 00:42:45 2009 -0700
@@ -246,7 +246,6 @@
}
g_free(normalized);
-#endif
//Yahoo doesn't have an explicit mobile state; instead the status message is automatically set to indicate mobility.
if (statusMessageString && ([statusMessageString isEqualToString:@"I'm on SMS"] ||
More information about the commits
mailing list