nsautoreleasepool - Regarding multiple threads on the iPhone -


I have a question. My case study is that I have two large SQLite databases and I want to use the thread (I.e. 2 processes simultaneously). Does this work well? I have written the following code:

  NSAutoreleasePool * dbPool; DbPool = [[NSAUTOriasius Alok] Init]; / * All databases are done here * / [dbPool release];   

Please guide me whether I am doing this correctly or not? Should I use a pool drain or stay?

And in this way, it is using concurrent processes, which means it is the same behavior as multitasking?

Thanks in advance!

Yes, you're correcting it. Each of your new threads needs its own Aurora pool.

According to your question about the clearance of the pool / pool, drainage message is advised.

What do you mean by SQL Database? How do you use it? If you access it through the coredata, you follow the following in your memory:

  • You need an NSManagedObjectContext per thread,
  • NSManagedObjects Do not pass on another thread, pass the object ID,
  • Before you pass the object ID to another thread, save it to the thread where it was modified before it passed.

    There are more rules, but these are basic.

    Multitasking means that you can run more applications at once. Multithreading (= your case) means that your app uses more threads to achieve its function.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -