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

Definition at line 11120 of file rt_pg.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().

11120  {
11121  int i = 0;
11122  if (arg->raster != NULL)
11123  rt_raster_destroy(arg->raster);
11124 
11125  if (arg->bandstats != NULL)
11126  pfree(arg->bandstats);
11127 
11128  if (arg->colormap != NULL) {
11129  if (arg->colormap->entry != NULL)
11130  pfree(arg->colormap->entry);
11131  pfree(arg->colormap);
11132  }
11133 
11134  if (arg->nentry) {
11135  for (i = 0; i < arg->nentry; i++) {
11136  if (arg->entry[i] != NULL)
11137  pfree(arg->entry[i]);
11138  }
11139  pfree(arg->entry);
11140  }
11141 
11142  if (arg->nelement) {
11143  for (i = 0; i < arg->nelement; i++)
11144  pfree(arg->element[i]);
11145  pfree(arg->element);
11146  }
11147 
11148  pfree(arg);
11149  arg = NULL;
11150 }
rt_raster raster
Definition: rt_pg.c:11071
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_api.c:5387
rt_colormap colormap
Definition: rt_pg.c:11076
rt_bandstats bandstats
Definition: rt_pg.c:11074
rt_colormap_entry entry
Definition: rt_api.h:2411

Here is the call graph for this function:

Here is the caller graph for this function: