PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_destroy()

static void rtpg_colormap_arg_destroy ( rtpg_colormap_arg  arg)
static

Definition at line 4092 of file rtpg_mapalgebra.c.

4092  {
4093  uint32_t i = 0;
4094  if (arg->raster != NULL)
4095  rt_raster_destroy(arg->raster);
4096 
4097  if (arg->bandstats != NULL)
4098  pfree(arg->bandstats);
4099 
4100  if (arg->colormap != NULL) {
4101  if (arg->colormap->entry != NULL)
4102  pfree(arg->colormap->entry);
4103  pfree(arg->colormap);
4104  }
4105 
4106  if (arg->nentry) {
4107  for (i = 0; i < arg->nentry; i++) {
4108  if (arg->entry[i] != NULL)
4109  pfree(arg->entry[i]);
4110  }
4111  pfree(arg->entry);
4112  }
4113 
4114  if (arg->nelement) {
4115  for (i = 0; i < arg->nelement; i++)
4116  pfree(arg->element[i]);
4117  pfree(arg->element);
4118  }
4119 
4120  pfree(arg);
4121  arg = NULL;
4122 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
rt_colormap_entry entry
Definition: librtcore.h:2496
unsigned int uint32_t
Definition: uthash.h:78

References rtpg_colormap_arg_t::bandstats, rtpg_colormap_arg_t::colormap, rtpg_colormap_arg_t::element, rt_colormap_t::entry, rtpg_colormap_arg_t::entry, rtpg_colormap_arg_t::nelement, rtpg_colormap_arg_t::nentry, rtpg_colormap_arg_t::raster, and rt_raster_destroy().

Referenced by RASTER_colorMap().

Here is the call graph for this function:
Here is the caller graph for this function: