Releasing locks on raster objects

Discussion created by emblaisdell on Jun 10, 2014
Latest reply on Jun 27, 2014 by Neil

I have written a pretty simple add-in (in C# .NET) that does some symbolizing on raster (TIF) layers, changing their renderers in the process.  When I remove these raster layers from ArcMap, sometimes I need to rename them in Windows, but I cannot because a message appears telling me they are still open in ArcMap.  This does not happen if I do not use the add-in on the files.

I have tried using ReleaseComObject on the raster layers before exiting the add-in, but this does not do the trick.  I should point out that when the raster layers are first added to ArcMap, tif.ovr and .tif.aux.xml files are created.  Could the problem have something to do with those?