PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ rtpg_nmapalgebra_arg_destroy()

static void rtpg_nmapalgebra_arg_destroy ( rtpg_nmapalgebra_arg  arg)
static

Definition at line 163 of file rtpg_mapalgebra.c.

163  {
164  int i = 0;
165 
166  if (arg->raster != NULL) {
167  for (i = 0; i < arg->numraster; i++) {
168  if (arg->raster[i] == NULL || !arg->ownsdata[i])
169  continue;
170 
171  rt_raster_destroy(arg->raster[i]);
172  }
173 
174  pfree(arg->raster);
175  pfree(arg->pgraster);
176  pfree(arg->isempty);
177  pfree(arg->ownsdata);
178  pfree(arg->nband);
179  }
180 
181  if (arg->cextent != NULL)
183  if( arg->mask != NULL )
184  pfree(arg->mask);
185 
186  pfree(arg);
187 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:86

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

Here is the call graph for this function:
Here is the caller graph for this function: