Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7623

Periodic Memory Leak when using Date.getUTCHours in QML JavaScript

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.1
    • Qt Script
    • None

    Description

      When using QTJSC::DateInstance::msToGregorianDateTime implicitly by calling Date.getUTCHours in QML JavaScript, memory is not freed causing memory to grow for ~40 seconds.

      The following is used in examples/declarative/clocks/Clock.qml of the kinetic/declarative repository;

          function timeChanged() {
              var date = new Date;
              hours = shift ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours()
              if ( hours < 7 || hours > 19 ) night = true; else night = false
              minutes = shift ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
              seconds = date.getUTCSeconds();
          }
      
          Timer {
              interval: 100; running: true; repeat: true; triggeredOnStart: true
              onTriggered: clock.timeChanged()
          }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kenthans Kent Hansen (Inactive)
            hhartz Henrik Hartz (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes