jQuery Mobile and Google Maps API v3 memory leak
in jQuery Mobile
•
11 years ago
I have a mobile web app using jQuery Mobile 1 and Google Maps API v3. It appears there is a major memory leak when loading Google Maps inside jQuery Mobile. The memory taken by the Google Maps does not get released when the user leaves the map page. So, when the user returns to the map page the memory usage keep growing. This is especially a big issue on mobile web browsers. I test the following on Android and on a desktop version of Chrome. The leak can be triggered as follows:
Navigate to: http://www.mycoursewalk.com/mobile_course_walk/show/25
Click "View Course" and let the map load fully. Then click the browser back button or the back button on the lower left corner. Reclick "View Course" and let the map load fully. Repeat. On every map load you see about 30MB added to the process of Chrome or the mobile browser.
How can I fix this? I can't find a Map API unload.
Thanks,
Nick,
1