PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void rtpg_nmapalgebra_arg_destroy ( rtpg_nmapalgebra_arg  arg)
static

Definition at line 16336 of file rt_pg.c.

References rtpg_nmapalgebra_arg_t::cextent, rtpg_nmapalgebra_arg_t::isempty, rtpg_nmapalgebra_arg_t::nband, rtpg_nmapalgebra_arg_t::numraster, rtpg_nmapalgebra_arg_t::ownsdata, rtpg_nmapalgebra_arg_t::pgraster, rtpg_nmapalgebra_arg_t::raster, and rt_raster_destroy().

Referenced by RASTER_nMapAlgebra(), and rtpg_nmapalgebraexpr_arg_destroy().

16336  {
16337  int i = 0;
16338 
16339  if (arg->raster != NULL) {
16340  for (i = 0; i < arg->numraster; i++) {
16341  if (arg->raster[i] == NULL || !arg->ownsdata[i])
16342  continue;
16343 
16344  rt_raster_destroy(arg->raster[i]);
16345  }
16346 
16347  pfree(arg->raster);
16348  pfree(arg->pgraster);
16349  pfree(arg->isempty);
16350  pfree(arg->ownsdata);
16351  pfree(arg->nband);
16352  }
16353 
16354  if (arg->cextent != NULL)
16355  rt_raster_destroy(arg->cextent);
16356 
16357  pfree(arg);
16358 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_api.c:5387
rt_raster * raster
Definition: rt_pg.c:16283
rt_pgraster ** pgraster
Definition: rt_pg.c:16282
uint8_t * ownsdata
Definition: rt_pg.c:16285

Here is the call graph for this function:

Here is the caller graph for this function: