iPhone - yet another unsolvable memory leak
could you take a look at this piece of code coming from "Leaks instruments" :
The tool indicates a memory leak in the string temp
that is underlined dotted. Or I release it just after I use it.
Also, the responsible librar开发者_JAVA技巧y seems to be Foundation, but yet in the stacktrace this is the last call in my projects. I just want to correct this. Maybe I can't ?
Thanks in advance.
The leak did not show up with the device.
I'm sorry but I forgot to mention the leak appeared in the simulator. I'm still curious if this is a known bug or something ?
Sometimes leaks appear in the simulator that do not appear on the device. If you don't see a leak on the device, do not worry about it.
However I would recommend you look into using the autoreleased versions of the various string calls you are using, like [NSString stringWithFormat:]
and simply saying:
temp = @"%s";
精彩评论