Hey Guys
I have leak problem here.
The Instrument that checks leak
says there is leak with code below.
[self.artRecords_list removeAllObjects];
[self.artRecords_list release];
self.artRecords_list = [[NSMutableArray alloc] init];
while(sqlite3_step(statement) == SQLITE_ROW)
{
self.ArtInfo = [[ArtRecord alloc] init]; // <- This is leaking point.
char * str_empty = (char * )sqlite3_column_text(statement,0);
if(str_empty != NULL)
{
self.ArtInfo.art_title = [NSString stringWithUTF8String

char * )sqlite3_column_text(statement,0)];
self.ArtInfo.part_title = [NSString stringWithUTF8String

char * )sqlite3_column_text(statement,1)];
[self.artRecords_list addObject:self.ArtInfo];
//[self.ArtInfo autorelease];
//[self.ArtInfo release];
}
Yes I need to make a list of Object that contains some information.
So I decided make NSMutableArray and I fill it with this Object.
and it says there is Leak.
I added some code like:
//[self.ArtInfo autorelease];
//[self.ArtInfo release];
these.
and It crashes.
Wherever point I put "release" code It crashes.
But I can't find any other way to make list of objects dynamically.
please help.
Thanks in advance.