Reputation: 354
I've developed an iOS application. There is a main screen which is displaying a google map and there are many markers, polygons etc in it. At the beginning app was using around 120MB of memory. - I touched settings button of my app and went to the settings page. there is no code. only segue connection in the storyboard (red line on the image) - then I came back to the map screen (white line on the image)
You can see the memory allocation. every time when I open the map screen memory usage is increasing
What is the problem. What should I do?
Upvotes: 2
Views: 1272
Reputation: 7176
The graph you have captured in Xcode is a decent overview of your memory consumption, but I'm afraid you are going to have to use more specific tools to diagnose this leak: Instruments comes shipped with Xcode and will help you track memory leaks; you will have to research (at least) the Leaks and Allocations instruments to figure out why your View Controller isn't being released.
While it is impossible to diagnose without seeing your code, that graph heavily suggests that your map view controller is not being released (hence the steady growth each time you create a new one)
To hazard a guess, I'd imagine you are creating a new mapView in viewDidAppear
rather than viewDidLoad
Upvotes: 2