You do need to work out a way to identify the different unique images you get from SHGetFileInfo
and only create one Image
for each. You must also keep track of the images you create because you must also dispose of them.
You may be able to use org.eclipse.jface.resource.ImageRegistry
to help manage the images. This requires a string key to identify each image. It looks like SHGetFileInfo
gives you an index number that could be used as a unique key.