iOS writeToFile crash
时间:2014-02-28 22:22:38
收藏:0
阅读:595
Recently I wrote an app to collect data from iPhone. However the app crashed after a random period of time which made my classmates sad. But finally, we found out where the bug is !!!!!
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flagDescription
The parameter atomically, I set NO from the Internet. However, it crashed when multiple writes happened. So setting atomically YES is essential for multiple threads!!!!!!!!
iOS writeToFile crash,布布扣,bubuko.com
原文:http://blog.csdn.net/taoqick/article/details/20078237
评论(0)