简体   繁体   English

在UIWebView设备中打开大小超过2Mb的本地csv文件时,应用程序崩溃

[英]Getting application crash during opening a local csv file with size more than 2Mb on UIWebView in device

Here ,I put my code. 在这里,我把我的代码。 its working fine for file size less than 2 mb. 它的工作正常,文件大小小于2 MB。 Anybody have any idea please help me. 有人有任何想法请帮助我。

-(void) viewWillAppear:(BOOL)animated{
     [super viewWillAppear:animated];
     NSURL *fileUrl=  [[NSBundle mainBundle] URLForResource:[NSString stringWithFormat:@"userdata"] withExtension:@".csv"];
     [webV loadRequest:[NSMutableURLRequest requestWithURL:fileUrl]];}

Application crash with the error : "Message from debugger: Terminated due to memory issue". 应用程序崩溃时出现错误:“来自调试器的消息:由于内存问题而终止”。 Thanks in advance 提前致谢

Do you have zombie objects turned on? 你有僵尸物体开启吗?

Another thought would be do you have any loops creating and destroying objects? 另一个想法是你有任何循环创建和销毁对象? The memory won't be released until the run loop it is in is allowed to complete or you include the code in an @autoreleasepool block . 在允许内存运行循环完成或将代码包含在@autoreleasepool块中之前,内存不会被释放。

在此输入图像描述

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM