Sag*_*ari 0 iphone memory-leaks cfnetwork
我在我的应用程序 - 仪器检查中遇到了以下类型的内存泄漏.我已正确分配和解除分配每个对象.但是我得到了这种类型的内存泄漏.
std :: _ Deque_base <__ CFURLCacheNode*,std :: allocator <__ CFURLCacheNode*>>> :: _ M_allocate_node()
产生这种泄漏的原因是什么?
为什么会发生内存泄漏?
图片 : -
alt text http://img197.imageshack.us/img197/9571/problem151.png
alt text http://img194.imageshack.us/img194/6181/problem152.png
替代文字http://img194.imageshack.us/img194/8035/problem153.png
alt text http://img193.imageshack.us/img193/6092/problem154.png
Sag*_*ari 10
在appDidFinishL中实现以下代码.功能
不会有泄漏
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil];
[NSURLCache setSharedURLCache:sharedCache];
[sharedCache release];
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
Run Code Online (Sandbox Code Playgroud)
}