PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ rtpg_union_arg_destroy()

static void rtpg_union_arg_destroy ( rtpg_union_arg  arg)
static

Definition at line 1771 of file rtpg_mapalgebra.c.

1771  {
1772  int i = 0;
1773  int j = 0;
1774  int k = 0;
1775 
1776  if (arg->bandarg != NULL) {
1777  for (i = 0; i < arg->numband; i++) {
1778  if (!arg->bandarg[i].numraster)
1779  continue;
1780 
1781  for (j = 0; j < arg->bandarg[i].numraster; j++) {
1782  if (arg->bandarg[i].raster[j] == NULL)
1783  continue;
1784 
1785  for (k = rt_raster_get_num_bands(arg->bandarg[i].raster[j]) - 1; k >= 0; k--)
1787  rt_raster_destroy(arg->bandarg[i].raster[j]);
1788  }
1789 
1790  pfree(arg->bandarg[i].raster);
1791  }
1792 
1793  pfree(arg->bandarg);
1794  }
1795 
1796  pfree(arg);
1797 }
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: