PostGIS  2.1.10dev-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 384 of file lwgeom_rtree.c.

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

385 {
386  RTreeGeomCache* rtree_cache = (RTreeGeomCache*)cache;
387 
388  if ( ! cache )
389  return LW_FAILURE;
390 
391  if ( rtree_cache->index )
392  {
393  RTreeCacheClear(rtree_cache->index);
394  lwfree(rtree_cache->index);
395  rtree_cache->index = 0;
396  rtree_cache->argnum = 0;
397  }
398  return LW_SUCCESS;
399 }
void lwfree(void *mem)
Definition: lwutil.c:190
#define LW_SUCCESS
Definition: liblwgeom.h:55
#define LW_FAILURE
Definition: liblwgeom.h:54
static void RTreeCacheClear(RTREE_POLY_CACHE *cache)
Free the cache object and all the sub-objects properly.
Definition: lwgeom_rtree.c:62
RTREE_POLY_CACHE * index
Definition: lwgeom_rtree.h:50

Here is the call graph for this function: