- (id)init {
if (self == [super init]) {
entries = [[NSMutableArray alloc] init];
NSString *file = [[NSBundle mainBundle] pathForResource:@"qanda" ofType:@"db"];
sqlite3 *database = NULL;
if (sqlite3_open([file UTF8String], &database) == SQLITE_OK) {
sqlite3_exec(database, "select * from qanda order by question", LoadEntriesCallback, entries, NULL);
}
sqlite3_close(database);
}
return self;
}
leak near entries object: instance variable used while 'self' is not set to the result of [ super of self[init ...]]
leak near self: returning while 'self' is not set to the result of [ super of self[init ...]]