I would like to thank @micantox for his attempt to solve my problem...
Anyways, I have solved my own problem.
I was trying to execute the loop from different threads.. that caused the actual problem.
one thread is add the annotations using the NSArray
and other thread is removing those NSArray
objects. to avoid this problem i have used
@synchronized(self)
{
// your code goes here
}