PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_destroy()

static void rtpg_colormap_arg_destroy ( rtpg_colormap_arg  arg)
static

Definition at line 4076 of file rtpg_mapalgebra.c.

4076  {
4077  uint32_t i = 0;
4078  if (arg->raster != NULL)
4079  rt_raster_destroy(arg->raster);
4080 
4081  if (arg->bandstats != NULL)
4082  pfree(arg->bandstats);
4083 
4084  if (arg->colormap != NULL) {
4085  if (arg->colormap->entry != NULL)
4086  pfree(arg->colormap->entry);
4087  pfree(arg->colormap);
4088  }
4089 
4090  if (arg->nentry) {
4091  for (i = 0; i < arg->nentry; i++) {
4092  if (arg->entry[i] != NULL)
4093  pfree(arg->entry[i]);
4094  }
4095  pfree(arg->entry);
4096  }
4097 
4098  if (arg->nelement) {
4099  for (i = 0; i < arg->nelement; i++)
4100  pfree(arg->element[i]);
4101  pfree(arg->element);
4102  }
4103 
4104  pfree(arg);
4105  arg = NULL;
4106 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:86
rt_colormap_entry entry
Definition: librtcore.h:2642

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: