diff --git a/Saviour Backup System/notificationIcon.cs b/Saviour Backup System/notificationIcon.cs index 7dc188f..07eec00 100644 --- a/Saviour Backup System/notificationIcon.cs +++ b/Saviour Backup System/notificationIcon.cs @@ -7,7 +7,7 @@ using System.Windows.Forms; namespace Saviour_Backup_System { - class notificationIcon + class notificationIcon : IDisposable { internal NotifyIcon notifyIcon = new NotifyIcon() ; internal ContextMenu contextMenu = new ContextMenu(); @@ -35,5 +35,10 @@ namespace Saviour_Backup_System internal void displayStillRunning() { } + public void Dispose()//deconstructor - for memory management + { + notifyIcon.Dispose(); + contextMenu.Dispose(); + } } }