diff --git a/SOPE/NGCards/CardElement.m b/SOPE/NGCards/CardElement.m index 445ed4d7c..80b6a0c7b 100644 --- a/SOPE/NGCards/CardElement.m +++ b/SOPE/NGCards/CardElement.m @@ -165,8 +165,7 @@ attrValues = [attributes objectForCaseInsensitiveKey: anAttribute]; if (!attrValues) { - attrValues = [NSMutableArray new]; - [attrValues autorelease]; + attrValues = [NSMutableArray array]; [attributes setObject: attrValues forKey: anAttribute]; } @@ -362,8 +361,7 @@ attrValues = [attributes objectForCaseInsensitiveKey: anAttribute]; if (!attrValues) { - attrValues = [NSMutableArray new]; - [attrValues autorelease]; + attrValues = [NSMutableArray array]; [attributes setObject: attrValues forKey: anAttribute]; } diff --git a/SOPE/NGCards/CardVersitRenderer.m b/SOPE/NGCards/CardVersitRenderer.m index d2a206daf..419aabf43 100644 --- a/SOPE/NGCards/CardVersitRenderer.m +++ b/SOPE/NGCards/CardVersitRenderer.m @@ -61,7 +61,7 @@ if (![anElement isVoid]) { - rendering = [NSMutableString new]; + rendering = [NSMutableString string]; if ([anElement group]) [rendering appendFormat: @"%@.", [anElement group]]; tag = [anElement tag]; @@ -113,7 +113,6 @@ [rendering appendString: @"\r\n"]; finalRendering = [rendering foldedForVersitCards]; - [rendering release]; } else finalRendering = @""; @@ -128,8 +127,7 @@ NSMutableString *rendering; NSString *groupTag; - rendering = [NSMutableString new]; - [rendering autorelease]; + rendering = [NSMutableString string]; groupTag = [aGroup tag]; if (!(groupTag && [groupTag length])) diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 6cbc3dc5a..e3697ba0a 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -813,7 +813,7 @@ if (removeDelegate) { - delegates = [NSMutableArray new]; + delegates = [NSMutableArray array]; while (otherDelegate) { @@ -846,7 +846,6 @@ [self sendReceiptEmailUsingTemplateNamed: @"Deletion" forObject: event to: delegates]; - [delegates release]; } if (addDelegate) @@ -939,7 +938,7 @@ NSMutableArray *element; NSDictionary *code; - element = [NSMutableArray new]; + element = [NSMutableArray array]; [element addObject: davElementWithContent (@"recipient", XMLNS_CALDAV, recipient)]; [element addObject: davElementWithContent (@"request-status", @@ -947,7 +946,6 @@ @"2.0;Success")]; code = davElementWithContent (@"response", XMLNS_CALDAV, element); - [element release]; return code; } diff --git a/SoObjects/Appointments/SOGoUserFolder+Appointments.m b/SoObjects/Appointments/SOGoUserFolder+Appointments.m index 9cabd42cc..154fdfc21 100644 --- a/SoObjects/Appointments/SOGoUserFolder+Appointments.m +++ b/SoObjects/Appointments/SOGoUserFolder+Appointments.m @@ -327,10 +327,10 @@ NSMutableArray *response, *props; NSDictionary *keyTuple; - response = [NSMutableArray new]; + response = [NSMutableArray array]; [response addObject: davElementWithContent (@"href", XMLNS_WEBDAV, [collection davURL])]; - props = [NSMutableArray new]; + props = [NSMutableArray array]; max = [properties count]; for (count = 0; count < max; count++) { @@ -360,8 +360,6 @@ props))]; [responses addObject: davElementWithContent (@"response", XMLNS_WEBDAV, response)]; - [props release]; - [response release]; } - (void) _appendProperties: (NSArray *) properties @@ -396,16 +394,14 @@ document = [[context request] contentAsDOMDocument]; documentElement = [document documentElement]; - matches = [NSMutableDictionary new]; - properties = [NSMutableArray new]; + matches = [NSMutableDictionary dictionary]; + properties = [NSMutableArray array]; [self _fillPrincipalMatches: matches andProperties: properties fromElement: documentElement]; collections = [self _principalCollectionsMatching: matches]; r = [self _prepareResponseFromContext: queryContext]; [self _appendProperties: properties ofCollections: collections toResponse: r]; - [properties release]; - [matches release]; return r; // @"/SOGo/dav/wsourdeau/" diff --git a/SoObjects/Contacts/SOGoFolder+CardDAV.m b/SoObjects/Contacts/SOGoFolder+CardDAV.m index f77898301..087f7c3ce 100644 --- a/SoObjects/Contacts/SOGoFolder+CardDAV.m +++ b/SoObjects/Contacts/SOGoFolder+CardDAV.m @@ -94,8 +94,7 @@ if ([(NSArray *) ranges count] && [(NSArray *) [[ranges objectAtIndex: 0] childNodes] count]) { - filterData = [NSMutableDictionary new]; - [filterData autorelease]; + filterData = [NSMutableDictionary dictionary]; [filterData setObject: [[(NSArray *)[[ranges objectAtIndex: 0] childNodes] lastObject] data] forKey: [filterElement attribute: @"name"]]; } diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 98b6be13a..003d44d18 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -263,7 +263,7 @@ static BOOL showTextAttachmentsInline = NO; if ([self _ensureDraftFolderPath]) { - infos = [NSMutableDictionary new]; + infos = [NSMutableDictionary dictionary]; [infos setObject: headers forKey: @"headers"]; if (text) [infos setObject: text forKey: @"text"]; @@ -287,8 +287,6 @@ static BOOL showTextAttachmentsInline = NO; error = [NSException exceptionWithHTTPStatus:500 /* server error */ reason: @"could not write draft info!"]; } - - [infos release]; } else { @@ -470,13 +468,13 @@ static BOOL showTextAttachmentsInline = NO; NSMutableArray *to, *addrs, *allRecipients; NSArray *envelopeAddresses, *userEmails; - allRecipients = [NSMutableArray new]; + allRecipients = [NSMutableArray array]; userEmails = [[context activeUser] allEmails]; [allRecipients addObjectsFromArray: userEmails]; to = [NSMutableArray arrayWithCapacity: 2]; - addrs = [NSMutableArray new]; + addrs = [NSMutableArray array]; envelopeAddresses = [_envelope replyTo]; if ([envelopeAddresses count]) [addrs setArray: envelopeAddresses]; @@ -530,9 +528,6 @@ static BOOL showTextAttachmentsInline = NO; [to release]; } - - [allRecipients release]; - [addrs release]; } - (NSArray *) _attachmentBodiesFromPaths: (NSArray *) paths diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index dae84dc29..4bd71ee62 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -213,8 +213,7 @@ static NSString *spoolFolder = nil; NSArray *result; NSString *currentFolderName, *prefix; - deepSubfolders = [NSMutableArray new]; - [deepSubfolders autorelease]; + deepSubfolders = [NSMutableArray array]; prefix = [self absoluteImap4Name]; @@ -1174,12 +1173,12 @@ static NSString *spoolFolder = nil; - (NSArray *) _sortOrderingsFromSortElement: (DOMElement *) sortElement { + static NSMutableDictionary *criteriasMap = nil; NSArray *davSortCriterias; NSMutableArray *sortOrderings; SEL sortOrderingOrder; NSString *davSortVerb, *imapSortVerb; EOSortOrdering *currentOrdering; - static NSMutableDictionary *criteriasMap = nil; int count, max; if (!criteriasMap) diff --git a/SoObjects/SOGo/NSArray+Utilities.m b/SoObjects/SOGo/NSArray+Utilities.m index 8416046d1..75cfc383a 100644 --- a/SoObjects/SOGo/NSArray+Utilities.m +++ b/SoObjects/SOGo/NSArray+Utilities.m @@ -185,7 +185,7 @@ } representation = [NSString stringWithFormat: @"[%@]", [jsonElements componentsJoinedByString: @", "]]; - [jsonElements release]; + [jsonElements autorelease]; return representation; } diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 071b3a093..2e88ad134 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -444,6 +444,7 @@ static NSArray *childRecordFields = nil; NSURL *folderLocation; NSString *sql; +#warning SOGoFolder should have the corresponding method [displayName release]; displayName = nil; diff --git a/UI/Common/UIxFolderActions.m b/UI/Common/UIxFolderActions.m index cffe55a32..41977c43c 100644 --- a/UI/Common/UIxFolderActions.m +++ b/UI/Common/UIxFolderActions.m @@ -65,10 +65,7 @@ ud = [activeUser userSettings]; moduleSettings = [ud objectForKey: baseFolder]; if (!moduleSettings) - { - moduleSettings = [NSMutableDictionary new]; - [moduleSettings autorelease]; - } + moduleSettings = [NSMutableDictionary dictionary]; [ud setObject: moduleSettings forKey: baseFolder]; mailInvitationParam diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 4f43536db..7a0887255 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -67,10 +67,7 @@ ud = [activeUser userSettings]; moduleSettings = [ud objectForKey: module]; if (!moduleSettings) - { - moduleSettings = [NSMutableDictionary new]; - [moduleSettings autorelease]; - } + moduleSettings = [NSMutableDictionary dictionary]; [ud setObject: moduleSettings forKey: module]; } @@ -317,8 +314,7 @@ // onObject: contactFolder // inContext: context] == nil) - folders = [NSMutableArray new]; - [folders autorelease]; + folders = [NSMutableArray array]; subfolders = [[parentFolder subFolders] objectEnumerator]; while ((subfolder = [subfolders nextObject])) diff --git a/UI/Contacts/UIxContactView.m b/UI/Contacts/UIxContactView.m index fd66726fc..47e357f1f 100644 --- a/UI/Contacts/UIxContactView.m +++ b/UI/Contacts/UIxContactView.m @@ -48,9 +48,7 @@ { NSMutableString *cardString; - cardString = [NSMutableString new]; - [cardString autorelease]; - + cardString = [NSMutableString string]; if (value && [value length] > 0) { if (label) @@ -129,7 +127,7 @@ NSString *email, *mailTo; NSMutableArray *emails; - emails = [NSMutableArray new]; + emails = [NSMutableArray array]; mailTo = nil; [emails addObjectsFromArray: [card childrenWithTag: @"email"]]; @@ -151,8 +149,6 @@ @"%@", email, [card fn], email, email]; } - [emails release]; - return [self _cardStringWithLabel: @"Additional Email:" value: mailTo]; } @@ -276,8 +272,7 @@ city = [homeAdr value: 3]; prov = [homeAdr value: 4]; - data = [NSMutableString new]; - [data autorelease]; + data = [NSMutableString string]; [data appendString: city]; if ([city length] > 0 && [prov length] > 0) [data appendString: @", "]; @@ -294,8 +289,7 @@ postalCode = [homeAdr value: 5]; country = [homeAdr value: 6]; - data = [NSMutableString new]; - [data autorelease]; + data = [NSMutableString string]; [data appendString: postalCode]; if ([postalCode length] > 0 && [country length] > 0) [data appendFormat: @", ", country]; @@ -417,8 +411,7 @@ city = [workAdr value: 3]; prov = [workAdr value: 4]; - data = [NSMutableString new]; - [data autorelease]; + data = [NSMutableString string]; [data appendString: city]; if ([city length] > 0 && [prov length] > 0) [data appendString: @", "]; @@ -435,8 +428,7 @@ postalCode = [workAdr value: 5]; country = [workAdr value: 6]; - data = [NSMutableString new]; - [data autorelease]; + data = [NSMutableString string]; [data appendString: postalCode]; if ([postalCode length] > 0 && [country length] > 0) [data appendFormat: @", ", country]; @@ -513,13 +505,13 @@ - (id ) vcardAction { +#warning this method is unused WOResponse *response; card = [[self clientObject] vCard]; if (card) { - response = [WOResponse new]; - [response autorelease]; + response = [context response]; [response setHeader: @"text/vcard" forKey: @"Content-type"]; [response appendContentString: [card versitString]]; } diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 03f931e13..91b3e33de 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -306,7 +306,7 @@ _xmlCharsetForCharset (NSString *charset) } else { - resultPart = [NSMutableString new]; + resultPart = [NSMutableString string]; [resultPart appendFormat: @"<%@", _rawName]; max = [_attributes count]; @@ -353,7 +353,6 @@ _xmlCharsetForCharset (NSString *charset) [resultPart appendString: @">"]; [result appendString: resultPart]; - [resultPart release]; } } } diff --git a/UI/MailerUI/UIxMailFolderActions.m b/UI/MailerUI/UIxMailFolderActions.m index 7320dd1e4..ae3b71e83 100644 --- a/UI/MailerUI/UIxMailFolderActions.m +++ b/UI/MailerUI/UIxMailFolderActions.m @@ -328,10 +328,7 @@ ud = [[context activeUser] userSettings]; mailSettings = [ud objectForKey: @"Mail"]; if (!mailSettings) - { - mailSettings = [NSMutableDictionary new]; - [mailSettings autorelease]; - } + mailSettings = [NSMutableDictionary dictionary]; [ud setObject: mailSettings forKey: @"Mail"]; [mailSettings setObject: [co traversalFromMailAccount] forKey: [NSString stringWithFormat: @"%@Folder", diff --git a/UI/MailerUI/UIxMailListView.m b/UI/MailerUI/UIxMailListView.m index 6fe2c2091..6c7726698 100644 --- a/UI/MailerUI/UIxMailListView.m +++ b/UI/MailerUI/UIxMailListView.m @@ -751,8 +751,7 @@ static NSArray *udColumnOrder = nil; NSEnumerator *flags; NSString *currentFlag; - labels = [NSMutableArray new]; - [labels autorelease]; + labels = [NSMutableArray array]; flags = [[message objectForKey: @"flags"] objectEnumerator]; while ((currentFlag = [flags nextObject]))