0

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

@synchronized(self.array) { some code } am using like this now. but still it was getting crashed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.