Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stringwithformat leak when add this string in an array

 
Rizwan Lateef
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i add [NSString stringWithFormat:@"abc"] string in array leak tool gives me a leak there, can any body tell me the solution?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I think it will always be a leak. And there are places that say it is better to use [[NSString alloc] initWithFormat] instead and remember to call release yourself.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic