I have spent a few weeks wrestling Apple's class implementation of Google Maps in the SDK. Most of the stuff is quite easy to understand but I had a memory leak problem. I substituted my code with an Apple example code project and was still getting the leaks.
It appears that MKMapKit places the imagery from Google into the applications cache and using the MapView class ends up with massive cryptic memory leaks of varying size and error responses. Along with the fun of fixing memory leaks it tends to car-crash an app if you thought you cleaned all the leaks up but one was lurking, waiting for the fifteenth press of the map button.
To fix this frustrating problem add this snippet of code in your app's appdelegate.
It appears that MKMapKit places the imagery from Google into the applications cache and using the MapView class ends up with massive cryptic memory leaks of varying size and error responses. Along with the fun of fixing memory leaks it tends to car-crash an app if you thought you cleaned all the leaks up but one was lurking, waiting for the fifteenth press of the map button.
To fix this frustrating problem add this snippet of code in your app's appdelegate.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
//memory clearance NSURLCache *sharedCache = [[NSURLCache alloc]initWithMemoryCapacity:0 diskCapacity:0 diskPath:nil]; [NSURLCache setSharedURLCache:sharedCache]; [sharedCache release];}
I'm wondering if this was a deliberate sabotage? Thoughts

Comments