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

◆ RTreeFreer()

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.

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->gcache.argnum = 0;
411 }
412 return LW_SUCCESS;
413}
#define LW_FAILURE
Definition liblwgeom.h:110
#define LW_SUCCESS
Definition liblwgeom.h:111
void lwfree(void *mem)
Definition lwutil.c:242
static void RTreeCacheClear(RTREE_POLY_CACHE *cache)
Free the cache object and all the sub-objects properly.
GeomCache gcache
RTREE_POLY_CACHE * index

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

Here is the call graph for this function: