How to close a raster file after opened it?

Oct 30, 2013 at 7:07 AM
Some one help me please!

I produce some template rasters in my process. And I want to delete it in the end of process but I can not. It always result in IOExcetpion "File is being used by another process".
I tried to close and dispose it:
But it does not help.

On Close() method of IDataSet, it says: "This closes the data set. Many times this will simply do nothing, but in some cases this may close an open connection to a data source." What does it mean? Is it the reason why I can not close the raster file to delete it?