Pergunta

I am following a youtube video about CSV data access. But I have seen in the framework that NSAutoreleasePool is specified as obsolete. Have we got another way to develop access to CSV data file?

Foi útil?

Solução

@autoreleasepool {
   // parse your CSV
}

Outras dicas

The "brackets" pool = [[NSAutoreleasePool alloc] init] and [pool drain]; have been replaced with @autoreleasepool { <stuff between the "brackets> }.

@autoreleasepool is not at all obsolete in iOS5++. In some cases you MUST set up your own autorelease pool, see the docs.
The most important cases are 1) if you have code that creates many temporary objects that could be released before the app returns to the main run loop (you should), and 2) if you setup a separate thread (you must).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top