Reputation: 159
I've a threaded application. In which I am running a background thread where I am filling the table cells and in the same screen when I change the date and click on OK button it will call a method in which it will remove all the objects in array (which was used in background thread for displaying table cell data) and my app was getting crashed. Please help me in this regard
Upvotes: 0
Views: 130
Reputation: 3366
There's two options here: 1) Use the @synchronized directive for your array 2) You use NSLock to manually lock your array for multiple treads manually.
Upvotes: 1