PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ PreparedCacheDelete()

static void PreparedCacheDelete ( void *  ptr)
static

Definition at line 99 of file lwgeom_geos_prepared.c.

100 {
101  MemoryContext context = (MemoryContext)ptr;
102 
103  PrepGeomHashEntry* pghe;
104 
105  /* Lookup the hash entry pointer in the global hash table so we can free it */
106  pghe = GetPrepGeomHashEntry(context);
107 
108  if (!pghe)
109  elog(ERROR, "PreparedCacheDelete: Trying to delete non-existent hash entry object with MemoryContext key (%p)", (void *)context);
110 
111  POSTGIS_DEBUGF(3, "deleting geom object (%p) and prepared geom object (%p) with MemoryContext key (%p)", pghe->geom, pghe->prepared_geom, context);
112 
113  /* Free them */
114  if ( pghe->prepared_geom )
115  GEOSPreparedGeom_destroy( pghe->prepared_geom );
116  if ( pghe->geom )
117  GEOSGeom_destroy( (GEOSGeometry *)pghe->geom );
118 
119  /* Remove the hash entry as it is no longer needed */
120  DeletePrepGeomHashEntry(context);
121 }
static void DeletePrepGeomHashEntry(MemoryContext mcxt)
static PrepGeomHashEntry * GetPrepGeomHashEntry(MemoryContext mcxt)
const GEOSGeometry * geom
const GEOSPreparedGeometry * prepared_geom

References DeletePrepGeomHashEntry(), PrepGeomHashEntry::geom, GetPrepGeomHashEntry(), and PrepGeomHashEntry::prepared_geom.

Referenced by PrepGeomCacheBuilder().

Here is the call graph for this function:
Here is the caller graph for this function: