PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_destroy()

static void rtpg_colormap_arg_destroy ( rtpg_colormap_arg  arg)
static

Definition at line 4097 of file rtpg_mapalgebra.c.

4097  {
4098  uint32_t i = 0;
4099  if (arg->raster != NULL)
4100  rt_raster_destroy(arg->raster);
4101 
4102  if (arg->bandstats != NULL)
4103  pfree(arg->bandstats);
4104 
4105  if (arg->colormap != NULL) {
4106  if (arg->colormap->entry != NULL)
4107  pfree(arg->colormap->entry);
4108  pfree(arg->colormap);
4109  }
4110 
4111  if (arg->nentry) {
4112  for (i = 0; i < arg->nentry; i++) {
4113  if (arg->entry[i] != NULL)
4114  pfree(arg->entry[i]);
4115  }
4116  pfree(arg->entry);
4117  }
4118 
4119  if (arg->nelement) {
4120  for (i = 0; i < arg->nelement; i++)
4121  pfree(arg->element[i]);
4122  pfree(arg->element);
4123  }
4124 
4125  pfree(arg);
4126  arg = NULL;
4127 }
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:2497

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: