1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(leak): Fix few memory leaks

This commit is contained in:
Diadlo 2018-06-11 16:31:38 +03:00
parent 535ffb5c4d
commit daaa5518dd
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
4 changed files with 5 additions and 1 deletions

View File

@ -219,6 +219,7 @@ ChatForm::~ChatForm()
Translator::unregister(this);
delete netcam;
netcam = nullptr;
delete offlineEngine;
}
void ChatForm::setStatusMessage(const QString& newMessage)

View File

@ -51,7 +51,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
setAttribute(Qt::WA_DeleteOnClose);
QVBoxLayout* bodyLayout = new QVBoxLayout();
bodyLayout = std::unique_ptr<QVBoxLayout>(new QVBoxLayout());
settingsWidgets = std::unique_ptr<QTabWidget>(new QTabWidget(this));
settingsWidgets->setTabPosition(QTabWidget::North);

View File

@ -56,6 +56,7 @@ private:
void retranslateUi();
private:
std::unique_ptr<QVBoxLayout> bodyLayout;
std::unique_ptr<QTabWidget> settingsWidgets;
std::array<std::unique_ptr<GenericForm>, 6> cfgForms;
int currentIndex;

View File

@ -528,11 +528,13 @@ Widget::~Widget()
delete icon;
delete profileForm;
delete profileInfo;
delete addFriendForm;
delete groupInviteForm;
delete filesForm;
delete timer;
delete contentLayout;
delete settingsWidget;
FriendList::clear();
GroupList::clear();