Memory leaks and "leaks" fixes.

This commit is contained in:
Gres 2015-10-11 18:33:55 +03:00
parent a4d3dd90fd
commit e5e9950cfc
3 changed files with 9 additions and 1 deletions

View File

@ -68,7 +68,8 @@ Pix * convertImage (const QImage &image) {
}
pixSetResolution (pix, resolutionX, resolutionY);
return pixEndianByteSwapNew (pix);
pixEndianByteSwap (pix);
return pix;
}
QImage convertImage (Pix &image) {

View File

@ -187,6 +187,12 @@ void Manager::applySettings () {
}
Manager::~Manager () {
foreach (SelectionDialog * selection, selections_.values ()) {
selection->hide ();
delete selection;
}
trayIcon_->hide ();
delete trayIcon_->contextMenu ();
foreach (QThread * thread, threads_) {
thread->quit ();
thread->wait (1000000);

View File

@ -23,6 +23,7 @@ SelectionDialog::SelectionDialog (const LanguageHelper &dictionary, QWidget *par
}
SelectionDialog::~SelectionDialog () {
delete languageMenu_;
delete ui;
}