PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ rtpg_colormap_arg_destroy()

static void rtpg_colormap_arg_destroy ( rtpg_colormap_arg  arg)
static

Definition at line 4030 of file rtpg_mapalgebra.c.

4030  {
4031  uint32_t i = 0;
4032  if (arg->raster != NULL)
4033  rt_raster_destroy(arg->raster);
4034 
4035  if (arg->bandstats != NULL)
4036  pfree(arg->bandstats);
4037 
4038  if (arg->colormap != NULL) {
4039  if (arg->colormap->entry != NULL)
4040  pfree(arg->colormap->entry);
4041  pfree(arg->colormap);
4042  }
4043 
4044  if (arg->nentry) {
4045  for (i = 0; i < arg->nentry; i++) {
4046  if (arg->entry[i] != NULL)
4047  pfree(arg->entry[i]);
4048  }
4049  pfree(arg->entry);
4050  }
4051 
4052  if (arg->nelement) {
4053  for (i = 0; i < arg->nelement; i++)
4054  pfree(arg->element[i]);
4055  pfree(arg->element);
4056  }
4057 
4058  pfree(arg);
4059  arg = NULL;
4060 }
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:2649

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: