my iphone application has lots of buttons (i created a calendar view with buttons) when i run it with Leaks tool - no leaks are discovered. But somehow Allocation Live Bytes reaches 21MB and application crashes (when buttons are clicked for about 120 times).
doesn't system autorelease memory not being used anymore... if there are no leaks how come memory keeps on increasing? any ideas on how to approach this problem will be appreciated. thanks.
i am using sqlite3 in my application to load (calendar - values stores against 30 days at a time)- which calls function getSingRecord 30 times... below is the actual code
-(void) insertRecordIntoTableNamed:
{
NSString *sql="Insert Statement......";
char *err;
if (sqlite3_exec(db, [sql UTF8String], NULL, NULL, &err) != SQLITE_OK) {
sqlite3_close(db);
NSAssert(0,@"Error updating table");
}
}
-(NSString *) getSingRecord: (NSString *) getStatement{
NSString *sql=getStatement;
sqlite3_stmt *statement;
NSString *fieldFlagI=@"0";
if (sqlite3_prepare_v2(db, [sql UTF8String], -1, &statement, nil) == SQLITE_OK) {
while (sqlite3_step(statement) == SQLITE_ROW) {
char *fieldFlag=(char *) sqlite3_column_text(statement, 0);
fieldFlagI=[[NSString alloc] initWithUTF8String:fieldFlag];
//fieldFlagI=[NSString initWithUTF8String:fieldFlag];
}
sqlite3_finalize(statement);
}
//NSString *ffI=fieldFlagI;
//[fieldFlagI release]
return [fieldFlagI autorelease];
}