views:

29

answers:

1

I've got a rather large loop that gets a string, does something to it, than goes onto the next one. I was originally releasing it then reallocating it but thought that is a bit of waste of resources but can't figure out how to just clear it out to reuse it.

+2  A: 

One way would be [myString setString: @""].

JWWalker
Thats annoying, I actually tried that and it crashed so thought it wouldn't work. Ended up I left another statement which crashed it.
Rudiger