PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ rt_raster_destroy()

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 82 of file rt_raster.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_asHexWKB(), RASTER_asRaster(), RASTER_asWKB(), 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_envelope(), RASTER_fromGDALRaster(), RASTER_fromHexWKB(), RASTER_fromWKB(), RASTER_GDALWarp(), RASTER_getBandFileSize(), RASTER_getBandFileTimestamp(), 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_noop(), RASTER_notSameAlignmentReason(), RASTER_out(), RASTER_overlaps(), RASTER_pixelOfValue(), RASTER_quantile(), RASTER_quantileCoverage(), RASTER_rasterToWorldCoord(), RASTER_reclass(), RASTER_sameAlignment(), RASTER_setBandIsNoData(), RASTER_setBandNoDataValue(), RASTER_setBandPath(), 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_summaryStats_transfn(), RASTER_summaryStatsCoverage(), RASTER_tile(), 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().

82  {
83  if (raster == NULL)
84  return;
85 
86  RASTER_DEBUGF(3, "Destroying rt_raster @ %p", raster);
87 
88  if (raster->bands)
89  rtdealloc(raster->bands);
90 
91  rtdealloc(raster);
92 }
#define RASTER_DEBUGF(level, msg,...)
Definition: librtcore.h:299
void rtdealloc(void *mem)
Definition: rt_context.c:186
rt_band * bands
Definition: librtcore.h:2303
Here is the call graph for this function: