Ticket #8035 (assigned)

Opened 7 years ago

Last modified 5 years ago

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:2 Changed 7 years ago by Keith Brown

  • Keywords Maintainance added; maintainance removed

comment:3 Changed 7 years ago by Keith Brown

  • Keywords Maintenance added; Maintainance removed

comment:4 Changed 7 years ago by Keith Brown

  • Owner set to Keith Brown

comment:5 Changed 7 years ago by Keith Brown

  • Milestone changed from Release 3.1 to Backlog

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

comment:7 Changed 6 years ago by Keith Brown

  • Owner changed from Keith Brown to Anyone

not going to get this done before i leave, leaving to anyone

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8880

Note: See TracTickets for help on using tickets.