adium 2493:ea717866cd0f: Minor cleanup, leak hunting but haven't...

commits at adium.im commits at adium.im
Sat Jun 13 00:44:40 UTC 2009


details:	http://hg.adium.im/adium/rev/ea717866cd0f
revision:	2493:ea717866cd0f
author:		David Smith <catfish.man at gmail.com>
date:		Fri Jun 12 17:44:25 2009 -0700

Minor cleanup, leak hunting but haven't found it yet
Subject: adium 2494:8c80cabfaf62: Leak fix

details:	http://hg.adium.im/adium/rev/8c80cabfaf62
revision:	2494:8c80cabfaf62
author:		David Smith <catfish.man at gmail.com>
date:		Fri Jun 12 17:44:32 2009 -0700

Leak fix

diffs (36 lines):

diff -r dc0f81f86bdc -r 8c80cabfaf62 Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.m
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.m	Fri Jun 12 17:06:31 2009 -0700
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.m	Fri Jun 12 17:44:32 2009 -0700
@@ -155,16 +155,14 @@
 @synthesize delegate;
 
 - (void) xmlStartElement:(const XML_Char *)name attributes:(const XML_Char **)attributes {
-    AWEzvXMLNode    *node;
-    NSString	    *attribute, *value, *nodeName;
     
-    nodeName = [NSString stringWithUTF8String:name];
+    NSString *nodeName = [NSString stringWithUTF8String:name];
     
-    node = [[[AWEzvXMLNode alloc] initWithType:AWEzvXMLElement name:nodeName] autorelease];
+    AWEzvXMLNode *node = [[[AWEzvXMLNode alloc] initWithType:AWEzvXMLElement name:nodeName] autorelease];
     
     while (*attributes != NULL) {
-        attribute = [NSString stringWithUTF8String:*attributes++];
-        value = [NSString stringWithUTF8String:*attributes++];
+        NSString *attribute = [NSString stringWithUTF8String:*attributes++];
+        NSString *value = [NSString stringWithUTF8String:*attributes++];
         [node addAttribute:attribute withValue:value];
     }
     
diff -r dc0f81f86bdc -r 8c80cabfaf62 Source/Logorrhea/Chat.m
--- a/Source/Logorrhea/Chat.m	Fri Jun 12 17:06:31 2009 -0700
+++ b/Source/Logorrhea/Chat.m	Fri Jun 12 17:44:32 2009 -0700
@@ -302,7 +302,7 @@
 
 - (NSArray *) participants
 {
-	NSMutableSet *participantSet = [[NSMutableSet alloc] init];
+	NSMutableSet *participantSet = [[[NSMutableSet alloc] init] autorelease];
 	
     for (unsigned int i=0; i < [instantMessages count]; i++)
 	{




More information about the commits mailing list