In my project the data read from database is assigned to an allocated object. After the object is added to an NSMutableArray. And then the object is released. Is there any problem with doing like this? My source code:
while (sqlite3_step(statement) == SQLITE_ROW)
{
TopicEntry *temp = [[TopicEntry alloc] init];
ruleName = (char *)sqlite3_column_text(statement, 2);
[temp setTopicName:(ruleName) ?[NSString stringWithUTF8String:ruleName] :@""];
[temp setParentID:(int)sqlite3_column_int(statement, 2)];
[rules addObject:temp];
[temp release];
}