PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ rtpg_nmapalgebra_arg_destroy()

static void rtpg_nmapalgebra_arg_destroy ( rtpg_nmapalgebra_arg  arg)
static

Definition at line 167 of file rtpg_mapalgebra.c.

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

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: