Is Objective-C's NSMutableArray thread-safe?

前端 未结 7 927
野的像风
野的像风 2020-12-04 09:54

I\'ve been trying to fix this crash for almost a week. The application crashes without any exception or stack-trace. The application does not crash in any way while running

7条回答
  •  失恋的感觉
    2020-12-04 10:40

    All the NSMutablexxx classes are not thread-safe. Operations including get,insert,remove,add and replace should be used with NSLock.This is a list of thread-safe and thread-unsafe classes given by apple: Thread Safety Summary

提交回复
热议问题