resource.close();
ResourceValue resource = ref.get();  if (resource != null) resource.close();
  public void close()  {    while (_outputBuffer != null)      popOutputBuffer();    try {      for (int i = 0; i < _shutdownList.size(); i++)	_shutdownList.get(i).eval(this);    } catch (Throwable e) {      log.log(Level.FINE, e.toString(), e);    }    if (_session != null && _session.getSize() > 0) {      SessionCallback cb = getSessionCallback();      if (cb != null) {	String value = QuercusVariableModule.serialize(_session.getArray());	cb.write(this, _session.getId(), value);	cb.close(this);      }      else {	_quercus.saveSession(this, _session.getId(), _session);      }    }        for (ResourceValue resource : _resourceList) {      try {	resource.close();      } catch (Throwable e) {	log.log(Level.FINER, e.toString(), e);      }    }  }