--- queensgui/src/queensmain.cpp 2007/07/20 01:22:53 5 +++ queensgui/src/queensmain.cpp 2007/07/20 16:58:04 8 @@ -129,6 +129,11 @@ QueensMain::~QueensMain() { delete m_board; + + if (m_solutions != NULL) + delete m_solutions; + if (m_sol != NULL) + delete m_sol; } void QueensMain::start() @@ -139,9 +144,12 @@ m_list->clear(); m_status->setText( QString("Searching ...") ); + m_board->setMatrix(0); + if (m_queens != NULL) { m_queens->wait(); delete m_queens; + m_queens = 0; } if (m_solutions != NULL) @@ -277,7 +285,7 @@ { QPopupMenu *contextMenu = new QPopupMenu( this ); contextMenu->setCheckable( true ); - QLabel *sortCaption = new QLabel("Sort algorithm", this); + QLabel *sortCaption = new QLabel("Container class", this); sortCaption->setAlignment( Qt::AlignCenter ); contextMenu->insertItem( sortCaption ); @@ -286,7 +294,8 @@ contextMenu->insertItem("Hash", this, SLOT( sortHash() ), 0, 3); contextMenu->insertItem("M*N Vector", this, SLOT(sortMNVector()), 0, 4); - QLabel *storageCaption = new QLabel("Storage class", this); + QLabel *storageCaption = new QLabel("Solution class", this); + storageCaption->setAlignment( Qt::AlignCenter ); contextMenu->insertItem( storageCaption ); contextMenu->insertItem("Matrix Solution", this, SLOT( storageMatrix() ), 0, 5); contextMenu->insertItem("Int Solution", this, SLOT( storageInt() ), 0, 6);