开发者

iPhone - yet another unsolvable memory leak

开发者 https://www.devze.com 2023-01-31 02:26 出处:网络
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.

could you take a look at this piece of code coming from "Leaks instruments" :

iPhone - yet another unsolvable memory leak

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";
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号