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);
|
||||
delete netcam;
|
||||
netcam = nullptr;
|
||||
delete offlineEngine;
|
||||
}
|
||||
|
||||
void ChatForm::setStatusMessage(const QString& newMessage)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user