void TRI_FreeShadowStore (TRI_shadow_store_t* const store) { assert(store); // force deletion of all remaining shadows TRI_CleanupShadowData(store, 0.0, true); TRI_DestroyMutex(&store->_lock); TRI_DestroyAssociativePointer(&store->_ids); TRI_DestroyAssociativePointer(&store->_pointers); TRI_Free(TRI_UNKNOWN_MEM_ZONE, store); }
void TRI_FreeGeneralCursor (TRI_general_cursor_t* cursor) { if (cursor->_deleted) { return; } cursor->_deleted = true; TRI_FreeCursorResult(cursor->_result); TRI_DestroyMutex(&cursor->_lock); TRI_Free(TRI_UNKNOWN_MEM_ZONE, cursor); LOG_TRACE("destroyed general cursor"); }
void TRI_DestroyShaper (TRI_shaper_t* shaper) { size_t n = shaper->_attributePathsByName._nrAlloc; size_t i; // only free pointers in attributePathsByName // (attributePathsByPid contains the same pointers!) for (i = 0; i < n; ++i) { void* data = shaper->_attributePathsByName._table[i]; if (data) { TRI_Free(shaper->_memoryZone, data); } } TRI_DestroyAssociativeSynced(&shaper->_attributePathsByName); TRI_DestroyAssociativeSynced(&shaper->_attributePathsByPid); TRI_DestroyMutex(&shaper->_attributePathLock); }
void TRI_ShutdownProcess () { TRI_FreeString(TRI_CORE_MEM_ZONE, ProcessName); #ifdef TRI_TAMPER_WITH_ENVIRON if (MustFreeEnvironment) { size_t i = 0; TRI_ASSERT(environ); // free all arguments copied for environ while (environ[i]) { TRI_FreeString(TRI_CORE_MEM_ZONE, environ[i]); ++i; } TRI_Free(TRI_CORE_MEM_ZONE, environ); } #endif TRI_DestroyVectorPointer(&ExternalProcesses); TRI_DestroyMutex(&ExternalProcessesLock); }
void TRI_DestroyShapeCollection (TRI_shape_collection_t* collection) { assert(collection); TRI_DestroyMutex(&collection->_lock); TRI_DestroyCollection(&collection->base); }