Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-2007

MapCircle leaks memory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.2
    • Fix Version/s: None
    • Component/s: Location
    • Labels:
      None
    • Environment:
      Nokia N8

      Description

      Adding and removing dynamically created MapCircle objects to a Map does not free all allocated memory. Around 8 kB per MapCircle is not freed.

      From the attached example:
      ...
      function createIcon(lat,lon)
      {
      var icon = Qt.createQmlObject('import QtQuick 1.1; import QtMobility.location 1.2; ' +
      'MapCircle{ radius: 100; color: "'+ mainPage.iconColor + '"; ' +
      'center: Coordinate

      {latitude: ' + lat + '; longitude: ' + lon + '}

      ' + ' } ',
      mainPage);
      if (icon !== null)

      { map.addMapObject(icon); MapHelper.mapObjects.push(icon); }

      }
      function updateMap()
      {
      clearMap();
      for (var x= -10; x<10; x++ )
      for (var y= -5; y<5; y++ )

      { var lat = 52.45705 + x * 0.01; var lon = 13.41173 + y * 0.01; createIcon(lat,lon); }

      }
      function clearMap()
      {
      while ( MapHelper.mapObjects.length > 0 )

      { var mapObj = MapHelper.mapObjects.pop(); map.removeMapObject(mapObj); mapObj.destroy(); }

      }
      ...

        Attachments

        1. MainPage.qml
          2 kB
        2. mapmemorytest.zip
          149 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            satu.m.makela satu makela
            Reporter:
            ebragge Eero Bragge
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes