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:
parent
535ffb5c4d
commit
daaa5518dd
@ -219,6 +219,7 @@ ChatForm::~ChatForm()
|
|||||||
Translator::unregister(this);
|
Translator::unregister(this);
|
||||||
delete netcam;
|
delete netcam;
|
||||||
netcam = nullptr;
|
netcam = nullptr;
|
||||||
|
delete offlineEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatForm::setStatusMessage(const QString& newMessage)
|
void ChatForm::setStatusMessage(const QString& newMessage)
|
||||||
|
@ -51,7 +51,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
|
|||||||
|
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
QVBoxLayout* bodyLayout = new QVBoxLayout();
|
bodyLayout = std::unique_ptr<QVBoxLayout>(new QVBoxLayout());
|
||||||
|
|
||||||
settingsWidgets = std::unique_ptr<QTabWidget>(new QTabWidget(this));
|
settingsWidgets = std::unique_ptr<QTabWidget>(new QTabWidget(this));
|
||||||
settingsWidgets->setTabPosition(QTabWidget::North);
|
settingsWidgets->setTabPosition(QTabWidget::North);
|
||||||
|
@ -56,6 +56,7 @@ private:
|
|||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::unique_ptr<QVBoxLayout> bodyLayout;
|
||||||
std::unique_ptr<QTabWidget> settingsWidgets;
|
std::unique_ptr<QTabWidget> settingsWidgets;
|
||||||
std::array<std::unique_ptr<GenericForm>, 6> cfgForms;
|
std::array<std::unique_ptr<GenericForm>, 6> cfgForms;
|
||||||
int currentIndex;
|
int currentIndex;
|
||||||
|
@ -528,11 +528,13 @@ Widget::~Widget()
|
|||||||
|
|
||||||
delete icon;
|
delete icon;
|
||||||
delete profileForm;
|
delete profileForm;
|
||||||
|
delete profileInfo;
|
||||||
delete addFriendForm;
|
delete addFriendForm;
|
||||||
delete groupInviteForm;
|
delete groupInviteForm;
|
||||||
delete filesForm;
|
delete filesForm;
|
||||||
delete timer;
|
delete timer;
|
||||||
delete contentLayout;
|
delete contentLayout;
|
||||||
|
delete settingsWidget;
|
||||||
|
|
||||||
FriendList::clear();
|
FriendList::clear();
|
||||||
GroupList::clear();
|
GroupList::clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user