Microsoft.VisualStudio.Project.ImageHandler.Close C# (CSharp) Method

Close() public method

Closes the ImageHandler object freeing its resources.
public Close ( ) : void
return void
        public virtual void Close()
        {
            if(null != iconHandles)
            {
                foreach(IntPtr hnd in iconHandles)
                {
                    if(hnd != IntPtr.Zero)
                    {
                        NativeMethods.DestroyIcon(hnd);
                    }
                }
                iconHandles = null;
            }

            if(null != imageList)
            {
                imageList.Dispose();
                imageList = null;
            }
        }