PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ rtpg_union_arg_destroy()

static void rtpg_union_arg_destroy ( rtpg_union_arg  arg)
static

Definition at line 1766 of file rtpg_mapalgebra.c.

1766  {
1767  int i = 0;
1768  int j = 0;
1769  int k = 0;
1770 
1771  if (arg->bandarg != NULL) {
1772  for (i = 0; i < arg->numband; i++) {
1773  if (!arg->bandarg[i].numraster)
1774  continue;
1775 
1776  for (j = 0; j < arg->bandarg[i].numraster; j++) {
1777  if (arg->bandarg[i].raster[j] == NULL)
1778  continue;
1779 
1780  for (k = rt_raster_get_num_bands(arg->bandarg[i].raster[j]) - 1; k >= 0; k--)
1782  rt_raster_destroy(arg->bandarg[i].raster[j]);
1783  }
1784 
1785  pfree(arg->bandarg[i].raster);
1786  }
1787 
1788  pfree(arg->bandarg);
1789  }
1790 
1791  pfree(arg);
1792 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
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:372
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:381
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: