PostGIS  2.5.0dev-r@@SVN_REVISION@@
static void rtpg_colormap_arg_destroy ( rtpg_colormap_arg  arg)
static

Definition at line 4027 of file rtpg_mapalgebra.c.

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().

4027  {
4028  uint32_t i = 0;
4029  if (arg->raster != NULL)
4030  rt_raster_destroy(arg->raster);
4031 
4032  if (arg->bandstats != NULL)
4033  pfree(arg->bandstats);
4034 
4035  if (arg->colormap != NULL) {
4036  if (arg->colormap->entry != NULL)
4037  pfree(arg->colormap->entry);
4038  pfree(arg->colormap);
4039  }
4040 
4041  if (arg->nentry) {
4042  for (i = 0; i < arg->nentry; i++) {
4043  if (arg->entry[i] != NULL)
4044  pfree(arg->entry[i]);
4045  }
4046  pfree(arg->entry);
4047  }
4048 
4049  if (arg->nelement) {
4050  for (i = 0; i < arg->nelement; i++)
4051  pfree(arg->element[i]);
4052  pfree(arg->element);
4053  }
4054 
4055  pfree(arg);
4056  arg = NULL;
4057 }
unsigned int uint32_t
Definition: uthash.h:78
rt_colormap_entry entry
Definition: librtcore.h:2447
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82

Here is the call graph for this function:

Here is the caller graph for this function: