PostGIS  2.2.7dev-r@@SVN_REVISION@@
static void PreparedCacheDelete ( MemoryContext  context)
static

Definition at line 121 of file lwgeom_geos_prepared.c.

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

122 {
123  PrepGeomHashEntry* pghe;
124 
125  /* Lookup the hash entry pointer in the global hash table so we can free it */
126  pghe = GetPrepGeomHashEntry(context);
127 
128  if (!pghe)
129  elog(ERROR, "PreparedCacheDelete: Trying to delete non-existant hash entry object with MemoryContext key (%p)", (void *)context);
130 
131  POSTGIS_DEBUGF(3, "deleting geom object (%p) and prepared geom object (%p) with MemoryContext key (%p)", pghe->geom, pghe->prepared_geom, context);
132 
133  /* Free them */
134  if ( pghe->prepared_geom )
135  GEOSPreparedGeom_destroy( pghe->prepared_geom );
136  if ( pghe->geom )
137  GEOSGeom_destroy( (GEOSGeometry *)pghe->geom );
138 
139  /* Remove the hash entry as it is no longer needed */
140  DeletePrepGeomHashEntry(context);
141 }
static void DeletePrepGeomHashEntry(MemoryContext mcxt)
const GEOSPreparedGeometry * prepared_geom
const GEOSGeometry * geom
static PrepGeomHashEntry * GetPrepGeomHashEntry(MemoryContext mcxt)

Here is the call graph for this function: