• 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
NSString leak or RedHerring again?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSString leak or RedHerring again?


  • Subject: NSString leak or RedHerring again?
  • From: James Cicenia <email@hidden>
  • Date: Thu, 5 Mar 2009 12:54:22 -0600

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


  • Follow-Ups:
    • Re: NSString leak or RedHerring again?
      • From: Bill Bumgarner <email@hidden>
    • Re: NSString leak or RedHerring again?
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: User In-Activity hook? And a request
  • Next by Date: Re: NSString leak or RedHerring again?
  • Previous by thread: Re: Disabling key bindings
  • Next by thread: Re: NSString leak or RedHerring again?
  • Index(es):
    • Date
    • Thread