How do I run a living object on a background thread?

How would I create an object that lives on a background thread? I want the object to be used as a delegate for CLLocationManager. That means the object must still be in the process whenever a callback function is called.


How would I access the object from two different pieces of code in different callback functions in a view controller class?

Answered by junkpile in 359466022

Your question makes little sense. Objects don’t “run” on threads. Code runs. If you want an object to “live”, keep a strong reference to it somewhere.

Accepted Answer

Your question makes little sense. Objects don’t “run” on threads. Code runs. If you want an object to “live”, keep a strong reference to it somewhere.

How do I run a living object on a background thread?
 
 
Q