PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ rtpg_nmapalgebra_arg_destroy()

static void rtpg_nmapalgebra_arg_destroy ( rtpg_nmapalgebra_arg  arg)
static

Definition at line 162 of file rtpg_mapalgebra.c.

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