Disposing an ImageList
问题 What's the appropriate way to dispose an ImageList object? Suppose I have some class with a private ImageList imageList member. Now, at some moment I perform the following code: // Basically, lazy initialization. if (imageList == null) { imageList = new ImageList(); Image[] images = Provider.CreateImages(...); foreach (var image in images) { // Does the 'ImageList' perform implicit copying here // or does it aggregate a reference? imageList.Images.Add(image); // Do I need to do this? //image