Re: NSString leak or RedHerring again?
Re: NSString leak or RedHerring again?
- Subject: Re: NSString leak or RedHerring again?
- From: Clark Cox <email@hidden>
- Date: Thu, 5 Mar 2009 10:57:35 -0800
What does -[AvailableItem dealloc] look like?
On Thu, Mar 5, 2009 at 10:54 AM, James Cicenia <email@hidden> wrote:
> 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)]];
> [newItem setType: [NSString stringWithUTF8String:(char
> *)sqlite3_column_text(statement, 1)]];
> [newItem setSubtype: [NSString stringWithUTF8String:(char
> *)sqlite3_column_text(statement, 2)]];
>
> [items addObject:newItem];
> [newItem release];
> }
>
> My instruments tells me it is leaking NSString.
>
> AvailableItem is a bare bones class with just synthesize and nothing else.
>
> Why is it leaking?
> Thanks
> James Cicenia
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden