PostGIS  2.1.10dev-r@@SVN_REVISION@@
void rt_raster_destroy ( rt_raster  raster)

Release memory associated to a raster.

Note that this will not release data associated to the band themselves (but only the one associated with the pointers pointing at them).

Parameters
raster: the raster to destroy

Definition at line 5387 of file rt_api.c.

References rt_raster_t::bands, RASTER_DEBUGF, and rtdealloc().

Referenced by _rti_colormap_arg_destroy(), cu_free_raster(), diff_rastinfo(), RASTER_addBand(), RASTER_addBandOutDB(), RASTER_addBandRasterArray(), RASTER_asGDALRaster(), RASTER_asRaster(), RASTER_band(), RASTER_bandIsNoData(), RASTER_bandmetadata(), RASTER_clip(), RASTER_colorMap(), RASTER_contains(), RASTER_containsProperly(), RASTER_convex_hull(), RASTER_copyBand(), RASTER_coveredby(), RASTER_covers(), raster_destroy(), RASTER_dfullywithin(), RASTER_dumpAsPolygons(), RASTER_dumpValues(), RASTER_dwithin(), RASTER_fromGDALRaster(), RASTER_GDALWarp(), RASTER_getBandNoDataValue(), RASTER_getBandPath(), RASTER_getBandPixelType(), RASTER_getBandPixelTypeName(), RASTER_getGeotransform(), RASTER_getHeight(), RASTER_getNumBands(), RASTER_getPixelHeight(), RASTER_getPixelPolygons(), RASTER_getPixelValue(), RASTER_getPixelWidth(), RASTER_getPolygon(), RASTER_getSRID(), RASTER_getWidth(), RASTER_getXScale(), RASTER_getXSkew(), RASTER_getXUpperLeft(), RASTER_getYScale(), RASTER_getYSkew(), RASTER_getYUpperLeft(), RASTER_hasNoBand(), RASTER_histogram(), RASTER_histogramCoverage(), RASTER_in(), RASTER_intersects(), RASTER_isEmpty(), RASTER_makeEmpty(), RASTER_mapAlgebra2(), RASTER_mapAlgebraExpr(), RASTER_mapAlgebraFct(), RASTER_mapAlgebraFctNgb(), RASTER_metadata(), RASTER_nearestValue(), RASTER_neighborhood(), RASTER_nMapAlgebra(), RASTER_nMapAlgebraExpr(), RASTER_notSameAlignmentReason(), RASTER_out(), RASTER_overlaps(), RASTER_pixelOfValue(), RASTER_quantile(), RASTER_quantileCoverage(), RASTER_rasterToWorldCoord(), RASTER_reclass(), RASTER_sameAlignment(), RASTER_setBandIsNoData(), RASTER_setBandNoDataValue(), RASTER_setGeotransform(), RASTER_setPixelValue(), RASTER_setPixelValuesArray(), RASTER_setPixelValuesGeomval(), RASTER_setRotation(), RASTER_setScale(), RASTER_setScaleXY(), RASTER_setSkew(), RASTER_setSkewXY(), RASTER_setSRID(), RASTER_setUpperLeftXY(), RASTER_summaryStats(), RASTER_summaryStatsCoverage(), RASTER_tile(), RASTER_to_binary(), RASTER_to_bytea(), RASTER_touches(), RASTER_union_finalfn(), RASTER_union_transfn(), RASTER_valueCount(), RASTER_valueCountCoverage(), RASTER_worldToRasterCoord(), rt_band_load_offline_data(), rt_raster_compute_skewed_raster(), rt_raster_deserialize(), rt_raster_from_band(), rt_raster_from_gdal_dataset(), rt_raster_from_two_rasters(), rt_raster_from_wkb(), rt_raster_gdal_rasterize(), rt_raster_gdal_warp(), rt_raster_iterator(), rt_raster_new(), rtpg_clip_arg_destroy(), rtpg_colormap_arg_destroy(), rtpg_nmapalgebra_arg_destroy(), rtpg_setvaluesgv_arg_destroy(), and rtpg_union_arg_destroy().

5387  {
5388  if (raster == NULL)
5389  return;
5390 
5391  RASTER_DEBUGF(3, "Destroying rt_raster @ %p", raster);
5392 
5393  if (raster->bands)
5394  rtdealloc(raster->bands);
5395 
5396  rtdealloc(raster);
5397 }
void rtdealloc(void *mem)
Definition: rt_api.c:882
#define RASTER_DEBUGF(level, msg,...)
Definition: rt_api.h:285
rt_band * bands
Definition: rt_api.h:2228

Here is the call graph for this function: