我正在从 sqlite 数据库中提取和推送数据。我使用 FMDatabase 可可包装器。
我正在从多个线程中提取和推送数据,但我确保不会同时发生一个以上的事务。
我EXC_BAD_ACCESS
在数据库上打了几百次电话,但从来没有同时打过电话。它也与内存无关(我尝试过 NSZombies 并查看了参数的内存管理)。
这是堆栈和代码:
FMResultSet* result = [db executeQuery:@"select latitude, longitude from cache where name = ?", name];
[result next];
NSString* latitude = [result stringForColumn:@"latitude"];
NSString* longitude = [result stringForColumn:@"longitude"];
我不知道,有人有吗?