Skip to content

Commit 6211f36

Browse files
committed
Shutdown NetcdfClibrary when exiting toolsUI
1 parent 516e9ae commit 6211f36

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

uicdm/src/main/java/ucar/nc2/ui/ToolsUI.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import ucar.nc2.dods.DODSNetcdfFile;
1717
import ucar.nc2.dt.GridDataset;
1818
import ucar.nc2.dt.RadialDatasetSweep;
19+
import ucar.nc2.ffi.netcdf.NetcdfClibrary;
1920
import ucar.nc2.ft.point.PointDatasetImpl;
2021
import ucar.nc2.ft2.coverage.*;
2122
import ucar.nc2.grib.GribIndexCache;
@@ -1312,6 +1313,10 @@ public void run(Object o) {
13121313

13131314
public static void exit() {
13141315
doSavePrefsAndUI();
1316+
// close netCDF-C library, if loaded
1317+
if (NetcdfClibrary.isLibraryPresent()) {
1318+
NetcdfClibrary.shutdown();
1319+
}
13151320
System.exit(0);
13161321
}
13171322

0 commit comments

Comments
 (0)