added in disposing of objects for memory management
This commit is contained in:
parent
945879d9cf
commit
b4912017ed
1 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,7 @@ using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Saviour_Backup_System
|
namespace Saviour_Backup_System
|
||||||
{
|
{
|
||||||
class notificationIcon
|
class notificationIcon : IDisposable
|
||||||
{
|
{
|
||||||
internal NotifyIcon notifyIcon = new NotifyIcon() ;
|
internal NotifyIcon notifyIcon = new NotifyIcon() ;
|
||||||
internal ContextMenu contextMenu = new ContextMenu();
|
internal ContextMenu contextMenu = new ContextMenu();
|
||||||
|
@ -35,5 +35,10 @@ namespace Saviour_Backup_System
|
||||||
internal void displayStillRunning() {
|
internal void displayStillRunning() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public void Dispose()//deconstructor - for memory management
|
||||||
|
{
|
||||||
|
notifyIcon.Dispose();
|
||||||
|
contextMenu.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue