T
Trev Hunter
Hi,
I have a listview which is set to view items in a small icon view. It's set
up to get the images from an image list.
When I populate the listview, I clear the image list and add new images for
each item. This seems to work fine, but what I was wondering was if I should
call the Dispose method on the images when clearing the imagelist before
repopulating the listview?
Currently, I'm doing the following:
----------------------
' Clear the lists
lstItems.Items.Clear
ilstItemImages.Images.Clear
' Before calling clear, should I get a
' reference to the images and call
' Dispose() after calling clear?
' Add a new item
' Add a new icon for the item
.....
I have a listview which is set to view items in a small icon view. It's set
up to get the images from an image list.
When I populate the listview, I clear the image list and add new images for
each item. This seems to work fine, but what I was wondering was if I should
call the Dispose method on the images when clearing the imagelist before
repopulating the listview?
Currently, I'm doing the following:
----------------------
' Clear the lists
lstItems.Items.Clear
ilstItemImages.Images.Clear
' Before calling clear, should I get a
' reference to the images and call
' Dispose() after calling clear?
' Add a new item
' Add a new icon for the item
.....