PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ rtpg_nmapalgebra_arg_destroy()

static void rtpg_nmapalgebra_arg_destroy ( rtpg_nmapalgebra_arg  arg)
static

Definition at line 158 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().

158  {
159  int i = 0;
160 
161  if (arg->raster != NULL) {
162  for (i = 0; i < arg->numraster; i++) {
163  if (arg->raster[i] == NULL || !arg->ownsdata[i])
164  continue;
165 
166  rt_raster_destroy(arg->raster[i]);
167  }
168 
169  pfree(arg->raster);
170  pfree(arg->pgraster);
171  pfree(arg->isempty);
172  pfree(arg->ownsdata);
173  pfree(arg->nband);
174  }
175 
176  if (arg->cextent != NULL)
178  if( arg->mask != NULL )
179  pfree(arg->mask);
180 
181  pfree(arg);
182 }
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: