开发者

Memory leak in stringByAppendingString

开发者 https://www.devze.com 2023-02-08 08:46 出处:网络
NSString *strURL=@\"http://cache.finn.no/mmo/\"; strURL=[strURL stringByAppendingString:soapResults]; [arrMainImages addObject:strURL];
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

精彩评论

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