I'm working on a project that's had to support older hardware/software until now, so we can *finally* convert to ARC. Since it's been almost a year since I've worked on anything that used ARC, I'm a little rusty on some of the stranger stuff, like __unsafe_retained. Here's a pared down hunk before converting to ARC:
NSXMLElement* root = [NSXMLNode elementWithName:@"manifest" children:nil attributesWithDict:@{@"thing":@"stuff"}]; __block NSXMLElement* rezes = [NSXMLNode elementWithName:@"resources"]; __block NSXMLElement* rez; [root addChild:rezes]; [indices enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL* stop) { rez = [NSXMLNode elementWithName:@"resource" children:nil attributesWithDict:@{@"identifier":item}]; [rezes addChild:rez]; [self _addQTIManifestResources:images addResourcesToNode:rezes]; }]; After using Edit->Convert->To Objective-C ARC, the 2nd line was changed to: __unsafe_unretained NSXMLElement* rezes = [NSXMLNode elementWithName:@"resources"]; I've looked around, but can't find anything that explains why __unsafe_retained is needed AND why __block is NOT needed. Sent from iCloud's ridiculous UI, so, sorry about the formatting _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com