cdm/src/main/java/ucar/nc2/dataset/NetcdfDataset.java
@Override
  public synchronized void close() throws java.io.IOException {
    if (agg != null) {
      agg.persistWrite(); // LOOK  maybe only on real close ??
      agg.close();
    }

    if (cache != null) {
      //unlocked = true;
      if (cache.release(this)) return;
    }

    if (orgFile != null) orgFile.close();
    orgFile = null;
  }
@Override
  public synchronized void close() throws java.io.IOException {
    if (agg != null) {
      agg.persistWrite(); // LOOK  maybe only on real close ??
      agg.close();
    }

    if (cache != null) {
      //unlocked = true;
      if (cache.release(this)) return;
    }

    if (orgFile != null) orgFile.close();
    orgFile = null;
  }
@ Override public synchronized void close ( ) throws java . io . IOException { if ( agg != null ) { agg . persistWrite ( ) ; // LOOK  maybe only on real close ?? agg . close ( ) ; } if ( cache != null ) { //unlocked = true; if ( cache . release ( this ) ) return ; } if ( orgFile != null ) orgFile . close ( ) ; orgFile = null ; }
Close all resources (files, sockets, etc) associated with this dataset.
If the underlying file was acquired, it will be released, otherwise closed.
Close all resources ( files sockets etc ) associated with this dataset . If the underlying file was acquired it will be released otherwise closed .