开发者

Memory leak in stringByAppendingString

NSString *strURL=@"http://cache.finn.no/mmo/";
strURL=[strURL stringByAppendingString:soapResults];
[arrMainImages addObject:strURL];

My last two lines a开发者_JAVA技巧re causing memory leaks? Here, the variable soapResults is of type NSMutableString.


The snippet above looks fine regarding how you are using strURL - how do you actually know that there are leaks occuring in those lines?

You might want check though that you are releasing soapResults and arrMainImages properly if you took ownership of them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜