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

QOpenGLWidget GPU memory leak

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.14.1
    • GUI: OpenGL
    • None
    • Windows 10 Pro
    • Windows

    Description

       

      Creating QOpenGLWidget on stack or allocating dynamically will not free resources when deleted.

       

      I created one instance of QOpenGLWidget for every newly opened tab in TabWidget.

      After destroying them, memory in VRAM was not freed. It takes only a few tabs to get to 2GB of VRAM used without any option to free it. 

      I tried delete on context as well as on widget itself, deleteLater etc.

       

      To reproduce: Create project with MainWindow and TabWidget inside and some trigger event (PushButton or action etc.)
      And implement two methods.

       

      void Project::on_actionOpen_triggered() 
      {
       ui->tabWidget->addTab(new QOpenGLWidget, "Tab"); 
      } 

       

      void Project::on_tabWidget_tabCloseRequested(int tabId) 
      {
       QOpenGLWidget *vw = static_cast<QOpenGLWidget*>(ui->tabWidget->widget(tabId));
       vw->deleteLater(); 
      } 

       

      In TaskManager (and Visual Studio Memory Usage) the memory used will be only higher with minimal deallocations happening.

       

       

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            ligazetom Juraj Krasnansky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes