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

Temporary leak in QCocoaWindow::raise

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 5.6.0 Beta
    • QPA
    • None
    • Mac OS X

    • macOS

    Description

      My program includes a programming environment in which users can create their own programs. Among the things a user can do is to create and delete a window over and over and over. Users sometimes do this in processing jobs that run for hours or days.

      When the user does this on Mac OS X, Activity Monitor shows constantly-increasing memory use. When using the 32-bit version of our program, after about 4000 iterations, memory is exhausted and the program crashes.

      I get the same constantly-increasing memory use using the SDI example program if I add a loop that creates and deletes windows over and over.

      I traced this to QCocoaWindow::raise. If I put an autorelease pool around that call, memory use does not increase.

      I see that qcocoawindow.cpp uses QMacAutoReleasePool in many places. I believe adding a QMacAutoReleasePool to QCocoaWindow::raise would fix this problem.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            hrodstein Howard Rodstein
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes