Quantcast
Channel: DotSpatial Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1128

Closed Issue: File is not closed after Raster.Save() [23885]

$
0
0
Trying to open a tif raster file after calling Save method results in IOExcetpion "File is being used by another process"

Sample code:

```
AppManager app = new AppManager();
app.LoadExtensions();

IRaster raster = Raster.CreateRaster("test.tif", null, 20, 20, 1, Type.GetType("System.Single"), new string[1] { "" });
raster.Save();

File.Open("test.tif", FileMode.Open, FileAccess.Read, FileShare.None);
```

Even if I try calling Close and Dispose the error persists.


Creating a raster with same name results in error too:

```
AppManager app = new AppManager();
app.LoadExtensions();

IRaster raster = Raster.CreateRaster("test.tif", null, 20, 20, 1, Type.GetType("System.Single"), new string[1] { "" });
raster.Save();
raster.Close();
raster.Dispose();

IRaster raster2 = Raster.CreateRaster("test.tif", null, 20, 20, 1, Type.GetType("System.Single"), new string[1] { "" });
```

Viewing all articles
Browse latest Browse all 1128

Latest Images

Trending Articles



Latest Images