NSString leak or RedHerring again?

2009-03-05 Thread James Cicenia
Hello - I do this a lot but only this give me leaks: while (sqlite3_step(statement) == SQLITE_ROW) { AvailableItem *newItem = [[AvailableItem alloc]init]; [newItem setName: [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)]];

Re: NSString leak or RedHerring again?

2009-03-05 Thread Clark Cox
What does -[AvailableItem dealloc] look like? On Thu, Mar 5, 2009 at 10:54 AM, James Cicenia ja...@jimijon.com wrote: Hello - I do this a lot but only this give me leaks:  while (sqlite3_step(statement) == SQLITE_ROW) {        AvailableItem *newItem = [[AvailableItem alloc]init];        

Re: NSString leak or RedHerring again?

2009-03-05 Thread Bill Bumgarner
On Mar 5, 2009, at 10:54 AM, James Cicenia wrote: AvailableItem is a bare bones class with just synthesize and nothing else. Why is it leaking? You need to release the strings in AvaiableItem's -dealloc method. b.bum ___ Cocoa-dev mailing list

Re: NSString leak or RedHerring again?

2009-03-05 Thread James Cicenia
I had thought that @synthesize does that autmatically. I guess not. On Mar 5, 2009, at 1:18 PM, Bill Bumgarner wrote: On Mar 5, 2009, at 10:54 AM, James Cicenia wrote: AvailableItem is a bare bones class with just synthesize and nothing else. Why is it leaking? You need to release the

Re: NSString leak or RedHerring again?

2009-03-05 Thread Bill Bumgarner
On Mar 5, 2009, at 11:20 AM, James Cicenia wrote: I had thought that @synthesize does that autmatically. I guess not. It is desired, but it is actually exceedingly difficult to generalize a solution that is correct in all cases. There is a radar tracking this particular feature request --

Re: NSString leak or RedHerring again?

2009-03-05 Thread James Cicenia
OK That worked but now that I got you: Why is it complaining about the indicated array below: while (sqlite3_step(statement) == SQLITE_ROW) { //find subtype as key in the dict first if(![aDict objectForKey: [NSString stringWithUTF8String:(char

Re: NSString leak or RedHerring again?

2009-03-05 Thread Keary Suska
On Mar 5, 2009, at 12:26 PM, James Cicenia wrote: OK That worked but now that I got you: Why is it complaining about the indicated array below: while (sqlite3_step(statement) == SQLITE_ROW) { //find subtype as key in the dict first if(![aDict objectForKey: