Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Invalid
    • Affects Version/s: Release 1.8.0.1
    • Component/s: iOS
    • Environment:

      Titanium SDK version: 1.8.0.1
      Platform & version: iOS 5.0
      Device Details: iOS simulator (ipad)
      Host Operating System: OSX Lion
      Titanium Studio version: 1.0.7

    • Story Points:
      8
    • Sprint:
      2015 Sprint 01 SDK, 2015 Sprint 02 SDK

      Description

      PROBLEM DESCRIPTION

      User added and removed annotations from the map, it was releasing the TiMapAnnotationProxy but not the TiMapPinAnnotationView. It kept them "Living" and continued to add to their live bytes instead of moving the old ones into "Transitory".

      ACTUAL BEHAVIOR

      TiMapPinAnnotationView is not being released.

      EXPECTED BEHAVIOR

      TiMapPinAnnotationView should be released when not needed.

      TEST CASE

      var win = Ti.UI.createWindow({
          title:'Map'
      }),
      map = Ti.Map.createView({
          region:{
              latitude:36,
              latitudeDelta:5,
              longitude:-93,
              longitudeDelta:5
          },
          toggled:false,
          userLocation:false
      }),
      toggleAnnos = function(e){
          var lat = 31,
              lng = (e.source.toggled ? -98 : -89),
              annos = [];
          for(i=0;i<10;i++){
              annos.push({latitude:lat,longitude:lng});   
              lat++;
              if(e.source.toggled){
                  lng++;
              }else{
                  lng--;
              }
          }
          e.source.removeAllAnnotations();
          e.source.addAnnotations(annos);
          e.source.toggled = !e.source.toggled;
      };
      win.add(map);
      win.open();
      map.addEventListener('regionChanged',toggleAnnos);
      

      COMMUNITY DISCUSSION

      http://developer.appcelerator.com/question/131291/map-annotation-memory-leak

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jalter Jon Alter
                Reporter:
                mpmiranda Mauro Parra-Miranda
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code