public void Close() { if (null != iconHandles) { foreach (var hnd in iconHandles) { if (hnd != IntPtr.Zero) { NativeMethods.DestroyIcon(hnd); } } iconHandles = null; } if (null != imageList) { imageList.Dispose(); imageList = null; } }