• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString leak or RedHerring again?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSString leak or RedHerring again? (From: James Cicenia <email@hidden>)

  • Prev by Date: NSString leak or RedHerring again?
  • Next by Date: NSStatusItem when clicked shows custom view
  • Previous by thread: NSString leak or RedHerring again?
  • Next by thread: Re: NSString leak or RedHerring again?
  • Index(es):
    • Date
    • Thread