I am working on Location Finder App In which i am passing My Current Latitude & longitude into Map URL in UIWebview.
Now what happens is after sometimes when i Zoom in-out that Page 3-4 times then it Starts giving warning messages :
Received memory warning. Level=2
Edit:
Here is the code:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSString *urlAddress = [NSString stringWithFormat:@"https://www.google.com/maps?saddr=%25f,%25f&daddr=%25f,%25f%2522,appDel.curr_lat,appDel.curr_long,degreeslat,degresslong%255D";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.webview loadRequest:requestObj];
}
Important note :
- I have already tried to use memory management tools to find leaks. But i am not able to find the exact reason behind this warnings.
Please help me.
Thanks in Advance.
You’re getting a memory warning because… iOS is running low on memory. You should use less, maybe clearing caches of temporary data, or by optimising your code. If you don’t reduce the amount of memory you’re using, the OS may close your app.