public void close(){
  if (!isOpen)   return;
  Log.d(TAG,"Trying to close track");
  loadingLock.lock();
  try {
    save();
    if (saveFileStream != null) {
      SavingHelper.close(saveFileStream);
      saveFileStream=null;
    }
    savingDisabled=true;
    isOpen=false;
    Log.i(TAG,"Track closed");
  }
  finally {
    loadingLock.unlock();
  }
}

public void close ( ) { if ( ! isOpen ) return ; Log . d ( TAG , "Trying to close track" ) ; loadingLock . lock ( ) ; try { save ( ) ; if ( saveFileStream != null ) { SavingHelper . close ( saveFileStream ) ; saveFileStream = null ; } savingDisabled = true ; isOpen = false ; Log . i ( TAG , "Track closed" ) ; } finally { loadingLock . unlock ( ) ; } }
saves and closes the track . the object should not be used afterwards , as saving will be disabled . the save file will never be accessed by this object again , and isopen will be set to false . this will allow to open the track again .
