Properly delete the object and allow its destructor to cleanup

This commit is contained in:
gedmurphy 2018-01-18 16:43:11 +00:00 committed by Ged Murphy
parent 8c91a00fcf
commit 2abd068398

View file

@ -122,7 +122,7 @@ public:
{ {
IconWatcherData *Icon; IconWatcherData *Icon;
Icon = m_WatcherList.GetAt(Pos); Icon = m_WatcherList.GetAt(Pos);
CloseHandle(Icon->hProcess); delete Icon;
} }
} }
m_WatcherList.RemoveAll(); m_WatcherList.RemoveAll();