Ticket #8035 (assigned)
Instances of AxesDialog aren't being disposed of efficently
Reported by: | Keith Brown | Owned by: | Anyone |
---|---|---|---|
Priority: | minor | Milestone: | Backlog |
Component: | GUI | Keywords: | Maintenance |
Cc: | Blocked By: | #7865 | |
Blocking: | Tester: |
Description
During ticket #7865 the memory usage of AxesDialog increased, but it was assumed that this would be OK as the memory would be freed up once the dialog is closed. This is not the case.
What seems to be happening is that the instances of AxesDialog are being parented by the graph and are still hanging about in memory until the graph window is closed, when they really should be deleted once the dialog is closed.
An example of one areas that need improvement:
QDialog* ApplicationWindow::showScaleDialog() { MdiSubWindow *w = activeWindow(); if (!w) return 0; if (w->isA("MultiLayer")){ if (dynamic_cast<MultiLayer*>(w)->isEmpty()) return 0; Graph* g = dynamic_cast<MultiLayer*>(w)->activeGraph(); if (g->isPiePlot()){ QMessageBox::warning(this, tr("MantidPlot - Warning"), tr("This functionality is not available for pie plots!"));//Mantid return 0; } AxesDialog* ad = new AxesDialog(this,g); ad->exec(); return ad; } else if (w->isA("Graph3D")) return showPlot3dDialog(); return 0; }
At the time of writing, #7865 is still in progress so it might be wise to leave this until the improvements have been made.
Change History
comment:1 Changed 7 years ago by Keith Brown
- Keywords maintainance added
- Priority changed from trivial to minor
- Milestone changed from Backlog to Release 3.1
comment:6 Changed 7 years ago by Nick Draper
- Status changed from new to assigned
bulk move to assigned at the into of the triage step