PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ rtpg_nmapalgebra_arg_destroy()

static void rtpg_nmapalgebra_arg_destroy ( rtpg_nmapalgebra_arg  arg)
static

Definition at line 146 of file rtpg_mapalgebra.c.

References rtpg_nmapalgebra_arg_t::cextent, rtpg_nmapalgebra_arg_t::isempty, rtpg_nmapalgebra_arg_t::mask, 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().

146  {
147  int i = 0;
148 
149  if (arg->raster != NULL) {
150  for (i = 0; i < arg->numraster; i++) {
151  if (arg->raster[i] == NULL || !arg->ownsdata[i])
152  continue;
153 
154  rt_raster_destroy(arg->raster[i]);
155  }
156 
157  pfree(arg->raster);
158  pfree(arg->pgraster);
159  pfree(arg->isempty);
160  pfree(arg->ownsdata);
161  pfree(arg->nband);
162  }
163 
164  if (arg->cextent != NULL)
166  if( arg->mask != NULL )
167  pfree(arg->mask);
168 
169  pfree(arg);
170 }
rt_pgraster ** pgraster
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: