MainWindow destructor
-
Hi,
I have the following destructor
@MainWindow::~MainWindow()
{
disconnect(plugNPlay, SIGNAL(hid_comm_update(bool, int)), this, SLOT(update_gui(bool, int)));
delete plugNPlay;
delete ui;
delete m_undoStack;
}@where in the constructor, I have the following
@plugNPlay = new HID_PnP();
m_undoStack = new QUndoStack(this);@Now I get an error when exiting the destructor above "...write access error at 0x8..."
Any idea?
HID_PnP() is running a thread where its personnal destructor is@HID_PnP::~HID_PnP() {
closeDevice();
disconnect(timer, SIGNAL(timeout()), this, SLOT(PollUSB()));
this->quit();
this->wait();
delete timer;
}@ -
Set in debugger to catch errors/exceptions in the place of throw. This way you will get callstack of modules and the topmost is the place of throw. If you don't see module details then make sure you have symbols/pdb. Have you tried 'debug' version? it could give you more clues about the problems in your program.