Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(systemtrayicon, widget): Added deallocate memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Diadlo committed Apr 13, 2016
1 parent 0a2f541 commit cbb7eec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/widget/systemtrayicon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ SystemTrayIcon::SystemTrayIcon()

SystemTrayIcon::~SystemTrayIcon()
{
delete qtIcon;
#ifdef ENABLE_SYSTRAY_UNITY_BACKEND
delete unityIndicator;
delete unityMenu;
#endif
#ifdef ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND
delete statusNotifier;
delete snMenu;
#endif
#ifdef ENABLE_SYSTRAY_GTK_BACKEND
delete gtkIcon;
delete gtkMenu;
#endif
qDebug() << "Deleting SystemTrayIcon";
}

Expand Down
3 changes: 3 additions & 0 deletions src/widget/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,10 @@ Widget::~Widget()
Translator::unregister(this);
AutoUpdater::abortUpdates();
if (icon)
{
icon->hide();
delete icon;
}

delete profileForm;
delete settingsWidget;
Expand Down

0 comments on commit cbb7eec

Please sign in to comment.