Clicky

Application description:

1.      The application consists of a mapView and tableview and few buttons to view the current location,display favorite item etc.,
2.      The mapView is implemented using MKMapKit framework.
3.      There will be addresses shown in the table view with thumbnail images in the table view cells which are loaded from the URL.The addresses are taken from a SQLITE DB.
4.      There are different categories of addresses.
5.      Those addresses will be plotted in the map view  using different customized pins according to the address category.
6.      We can also tap a particular pin to see the small description about that in an annotation view on the map.
7.      Images and address detail are retrieved from the DB and stored in a class and referred using the class instance across the application.
8.      I have reduced the image sizes which I have used in the instance of class to populate it on the UITableView.

Issue:

The application runs perfectly in the simulator.

But when tried to run on the iPad,The application runs perfectly for few minutes.Then it starts to behave in the following way:

All buttons in the screen doesn't respond to the touch events after receiving memory warnings.

1.Memory warning.
2.Received memory warning Level 1.
3.Received memory warning Level 2.

The memory warnings are displayed multiple times in the console after that the application crashes.

Approaches undertaken:

Initially I thought the problem with the MKMapView cached tiles. So I have used following code in  mapViewWillStartLoadingMap: delegate method.


 - (void)mapViewWillStartLoadingMap:(MKMapView *)mapView {     NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil];     [NSURLCache setSharedURLCache:sharedCache];     [sharedCache release]; }                             
1: 2: 3: 4: 5: 

Select allOpen in new window



After this also, the application receives memory warnings. So I don't know what is the problem exactly.

asked 11/29/2011 12:06

CGVAK's gravatar image

CGVAK ♦♦


3 Answers:
Hard to tell from just your application description but you obviously have a memory leak somewhere. I'd say start by running the Analyser (hold down the Run button then choose Analyse) to see if you have any memory leaks. If you can't find the answer there, try the Profiler (again hold down the Run button but choose Profiler) and use the Activity Monitor, which will show you exactly what's eating your memory.
link

answered

Snapples's gravatar image

Snapples

It gave us an idea to fix the issue. Thank you
link

answered 2011-12-10 at 14:33:10

CGVAK's gravatar image

CGVAK

And whatvwascthe fix !
link

answered 2011-12-14 at 12:59:17

Tease27's gravatar image

Tease27

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×21
×23
×1
×1

Asked: 11/29/2011 12:06

Seen: 412 times

Last updated: 12/14/2011 04:59