PostGIS  2.3.7dev-r@@SVN_REVISION@@
static int RTreeFreer ( GeomCache *  cache)
static

Callback function sent into the GetGeomCache generic caching system.

On a cache miss, this function clears the cached index object.

Definition at line 398 of file lwgeom_rtree.c.

References RTreeGeomCache::argnum, RTreeGeomCache::index, LW_FAILURE, LW_SUCCESS, lwfree(), and RTreeCacheClear().

399 {
400  RTreeGeomCache* rtree_cache = (RTreeGeomCache*)cache;
401 
402  if ( ! cache )
403  return LW_FAILURE;
404 
405  if ( rtree_cache->index )
406  {
407  RTreeCacheClear(rtree_cache->index);
408  lwfree(rtree_cache->index);
409  rtree_cache->index = 0;
410  rtree_cache->argnum = 0;
411  }
412  return LW_SUCCESS;
413 }
void lwfree(void *mem)
Definition: lwutil.c:242
#define LW_SUCCESS
Definition: liblwgeom.h:79
#define LW_FAILURE
Definition: liblwgeom.h:78
static void RTreeCacheClear(RTREE_POLY_CACHE *cache)
Free the cache object and all the sub-objects properly.
Definition: lwgeom_rtree.c:76
RTREE_POLY_CACHE * index
Definition: lwgeom_rtree.h:74

Here is the call graph for this function: