NSAutoreleasePool的官方解释ImportantIfyouuseAutomaticReferenceCounting(ARC),youcannotuseautoreleasepoolsdirectly.Instead,youuse@autoreleasepoolblocksinstead.Forexample,inplaceof:NSAutoreleasePool*pool=[[NSAutoreleasePoolalloc]init;//Codebenefittingfromalocalautoreleasepool.[poolrelease];youwouldwrite:@autoreleasepool{//Codebenefittingfromalocalautoreleasepool.}@autoreleasepoolblocksaremoreefficientthanusinganinstanceofNSAutoreleasePooldirectly;youcanalsousethemevenifyoudonotuseARC.xcode4.3引入ARC,release这块就有些变化,当你使用ARC,就必须将NSAutoreleasePool的地方换成@autoreleasepoolhttp://marshal.easymorse.com/archives...
慕田峪9158850
相关分类