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

Memory leak of QLocalePrivate data when calling QString::num

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.1.0 Beta 1
    • None
    • Window 7; Visual Studio 2010; qt-windows-opensource-5.1.0-beta1-msvc2010-x86-offline

    Description

      Hi,

      I noticed in the Qt 5.1.0 beta 1 debug version lots of memory leaks of 12 bytes of size. After some research I pin pointed the problem in the QString::num static method that uses a QLocale which has a leak on it's shared data QLocalePrivate. Didn't do too much research after that, I only created a small test that shows this leak:

      int main(int argc, char *argv[])

      { _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); QString str = QString::number(14, 10); return -1; } In Visual Studio 2010 debug console: Detected memory leaks! Dumping objects -> {172}

      normal block at 0x02385EF0, 12 bytes long.
      Data: < G g > B0 47 1F 67 01 00 00 00 00 00 CD CD
      Object dump complete.

      I found something similar on the issue tracker at:
      https://bugreports.qt-project.org/browse/QTBUG-25279

      Cristi

      Attachments

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

        Activity

          People

            biochimia João Abecasis
            cristianbuzdug Cristian Buzduga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes