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

QBasicAtomicInt::deref() doesn't return 0 when it should do thus causing memory leaks with classes like QByteArray on Solaris x64

    XMLWordPrintable

Details

    • d15f4b53d0d52a94b3c44b927816967a151f7ccf

    Description

      QBasicAtomicInt::deref() doesn't return 0 when it should do thus causing memory leaks with classes like QByteArray on Solaris x64. deref() returns something other than 0 when the QByteArray in the following example is deleted therefore it ends up leaking memory.

      #include <QByteArray>
      
      int main(int argc, char **argv)
      {
          for (int i=0;i<100;i++)
             QByteArray ba("foo");
          return 0;
      }
      

      Using dbx on Solaris with "check -memuse" shows a clear memory leak coming from the QByteArray

      Attachments

        For Gerrit Dashboard: QTBUG-24470
        # Subject Branch Project Status CR V

        Activity

          People

            sapiippo Samuli Piippo
            andysh Andy Shaw
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes