Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11606

Android: MapView setLocation memory leak

    Details

      Description

      Memory leaks when setLocation is called.

      var win = Ti.UI.createWindow({
          backgroundColor : '#00f'
      });
       
       
      var map = Titanium.Map.createView({
          mapType : Titanium.Map.STANDARD_TYPE,
          region : {
              latitude : 42.3366,
              longitude : -71.1689,
              latitudeDelta : 0.01,
              longitudeDelta : 0.01
          }
      });
       
      function UpdateMapRoute(lat, lon)
      {
       
          map.setLocation({
              latitude : lat,
              longitude : lon,
              animate : true,
              latitudeDelta : 0.001,
              longitudeDelta : 0.004
          });
       
      }
       
      var lat = 42.3359;
      var lon = -71.1735;
       
      setInterval(function(){
          UpdateMapRoute(lat,lon);
          lat = lat + .002;
          lon = lon + .002;
      },500);
       
       
       
      win.add(map);
      win.open();
      

      Run code, wait about ~40s, app wil crash. You can look at DDMS to see that memory is leaking heavily

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              hpham Hieu Pham
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-14828
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration