org.esa.beam.framework.datamodel.GeoCoding.dispose()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中org.esa.beam.framework.datamodel.GeoCoding.dispose()方法的一些代码示例,展示了GeoCoding.dispose()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeoCoding.dispose()方法的具体详情如下:
包路径:org.esa.beam.framework.datamodel.GeoCoding
类名称:GeoCoding
方法名:dispose

GeoCoding.dispose介绍

[英]Releases all of the resources used by this object instance and all of its owned children. Its primary use is to allow the garbage collector to perform a vanilla job.

This method should be called only if it is for sure that this object instance will never be used again. The results of referencing an instance of this class after a call to dispose() are undefined.
[中]释放此对象实例及其所有子对象使用的所有资源。它的主要用途是允许垃圾收集器执行普通作业。
只有在确定不再使用此对象实例时,才应调用此方法。调用dispose()后引用此类实例的结果未定义。

代码示例

代码示例来源:origin: bcdev/beam

/**
 * Releases all of the resources used by this object instance and all of its owned children. Its primary use is to
 * allow the garbage collector to perform a vanilla job.
 * <p/>
 * <p>This method should be called only if it is for sure that this object instance will never be used again. The
 * results of referencing an instance of this class after a call to <code>dispose()</code> are undefined.
 */
@Override
public void dispose() {
  for (GeoCoding gc : _gcList) {
    if (gc != null) {
      gc.dispose();
    }
  }
  _gcList.clear();
}

代码示例来源:origin: bcdev/beam

/**
 * Releases all of the resources used by this object instance and all of its owned children. Its primary use is to
 * allow the garbage collector to perform a vanilla job.
 * <p/>
 * <p>This method should be called only if it is for sure that this object instance will never be used again. The
 * results of referencing an instance of this class after a call to <code>dispose()</code> are undefined.
 */
@Override
public void dispose() {
  for (GeoCoding gc : gcList) {
    if (gc != null) {
      gc.dispose();
    }
  }
  gcList.clear();
  latgrid = null;
  lonGrid = null;
}

代码示例来源:origin: bcdev/beam

/**
 * Releases all of the resources used by this object instance and all of its owned children. Its primary use is to
 * allow the garbage collector to perform a vanilla job.
 * <p/>
 * <p>This method should be called only if it is for sure that this object instance will never be used again. The
 * results of referencing an instance of this class after a call to <code>dispose()</code> are undefined.
 */
@Override
public synchronized void dispose() {
  if (latGrid != null) {
    latGrid.dispose();
    latGrid = null;
  }
  if (lonGrid != null) {
    lonGrid.dispose();
    lonGrid = null;
  }
  if (latLonImage != null) {
    latLonImage.dispose();
    latLonImage = null;
  }
  // Don't dispose the estimator, if it is not ours!
  if (estimatorCreatedInternally) {
    pixelPosEstimator.dispose();
  }
  pixelPosEstimator = null;
}

代码示例来源:origin: bcdev/beam

@Override
protected Throwable doInBackground() throws Exception {
  try {
    final Product product = VisatApp.getApp().getSelectedProduct();
    GeoCoding geoCoding = product.getGeoCoding();
    if (geoCoding instanceof BasicPixelGeoCoding) {
      final BasicPixelGeoCoding pixelGeoCoding = (BasicPixelGeoCoding) product.getGeoCoding();
      final GeoCoding delegate = pixelGeoCoding.getPixelPosEstimator();
      product.setGeoCoding(delegate);
    } else {
      product.setGeoCoding(null);
    }
    geoCoding.dispose();
  } catch (Throwable e) {
    return e;
  }
  return null;
}

代码示例来源:origin: bcdev/beam

geoCoding.dispose();
geoCoding = null;

相关文章