It’s been a while since I wrote my last post. Since then I got married, completed faculty, finished three iPhone applications for clients and three internal. Well, these are the main reasons for my absence and I think they are justified. 🙂
Now lets get back on memory leak issue created by CFNetwork class. If you create NSURLConnection object you will get this memory leak. First time I meet with this issue I was thinking it was my fault as developer, but when I tracked leak I realized that memory leak is created by framework internally. Instruments tool says clearly – “Responsible caller – CFNetwork”.
Well, this is my own conclusion and I might not be right but considering all given facts the leak is created by CFNetwork class. Also, I am not only one developer that has same issue. Many of iPhone developers has complain on same memory leak created by CFNetwork class. To solve this issue I try to put autoreleas pool like code below but no luck.
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
Also I tried to create NSURLCache object like code below but no luck.
NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil];
If any of you has meet similar issue or maybe has solution for this memory leak please leave comment bellow. Thanks! 🙂