I am getting that error when I try to do this using ARC with the following SQLite code:
NSMutableArray *rows = [[NSMutableArray alloc] init];
sqlite3_exec(database, "select distinct category from billy", callback, rows, NULL);
Anyone know how to fix this?
Be warned that I never do ARC, but casting rows parameter to (__bridge_retained void *) should help if I understand the document correctly.
Here is the code I use for testing.
(__bridge_transfer ) is for transferring the ownership back so ARC will release it correctly. I override dealloc of my NSTestMutableArray to show that it is really deallocated, and it won’t be deallocated if I comment the __bridge_transfer line.