PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ rtpg_union_arg_destroy()

static void rtpg_union_arg_destroy ( rtpg_union_arg  arg)
static

Definition at line 1725 of file rtpg_mapalgebra.c.

1725  {
1726  int i = 0;
1727  int j = 0;
1728  int k = 0;
1729 
1730  if (arg->bandarg != NULL) {
1731  for (i = 0; i < arg->numband; i++) {
1732  if (!arg->bandarg[i].numraster)
1733  continue;
1734 
1735  for (j = 0; j < arg->bandarg[i].numraster; j++) {
1736  if (arg->bandarg[i].raster[j] == NULL)
1737  continue;
1738 
1739  for (k = rt_raster_get_num_bands(arg->bandarg[i].raster[j]) - 1; k >= 0; k--)
1741  rt_raster_destroy(arg->bandarg[i].raster[j]);
1742  }
1743 
1744  pfree(arg->bandarg[i].raster);
1745  }
1746 
1747  pfree(arg->bandarg);
1748  }
1749 
1750  pfree(arg);
1751 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:86
void rt_band_destroy(rt_band band)
Destroy a raster band.
Definition: rt_band.c:340
uint16_t rt_raster_get_num_bands(rt_raster raster)
Definition: rt_raster.c:376
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:385
rtpg_union_band_arg bandarg

References rtpg_union_arg_t::bandarg, rtpg_union_arg_t::numband, rtpg_union_band_arg_t::numraster, rtpg_union_band_arg_t::raster, rt_band_destroy(), rt_raster_destroy(), rt_raster_get_band(), and rt_raster_get_num_bands().

Referenced by RASTER_union_finalfn(), and RASTER_union_transfn().

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