1

I am working on placing Google maps into an iPhone app. The app works for the ipad 4th gen, and 5th gen ipod and iphone. But on 4th gen devices if get a Received memory error warning. As follows:

    2013-07-02 12:11:17.745 Maps Test[33509:907] Received memory warning.
    2013-07-02 12:28:07.112 Maps Test[33558:907] Memory Error
    2013-07-02 12:11:20.683 Maps Test[33509:907] Received memory warning.
    2013-07-02 12:28:07.112 Maps Test[33558:907] Memory Error
    2013-07-02 12:11:44.643 Maps Test[33509:907] Received memory warning.
    2013-07-02 12:28:07.112 Maps Test[33558:907] Memory Error

These are the only errors I am getting for a piece of sample code.
The sample code is as follows.

#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController{
    GMSMapView *mapView_;
}
-(void)loadView
{
    GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude: -33.86         longitude:151.20 zoom:6];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
//create a marker on the map
GMSMarker *marker = [[GMSMarker alloc]init];
marker.position = CLLocationCoordinate2DMake(-33.86,151.20);
marker.title = @"Sydney";
marker.snippet = @"Australia";
marker.map = mapView_;
}
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    NSLog(@"Memory Error");
    // Dispose of any resources that can be recreated.
}
@end

I don't receive any level warnings or any other help that would allow me to figure out the issue. After scrolling the map a bit from Sydney to my current location the app crashes with no errors or any other hints that shows why the app is crashing. It will trigger the didReceiveMemoryWarning, but since this is all that is running what else can I kill to keep the app alive while using the maps?

Thanks in advance!

friedbunny
  • 2,421
  • 1
  • 23
  • 38
Big Kahuna
  • 149
  • 6

0 Answers0