MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / AttributeSet_Free

Function AttributeSet_Free

src/graph/entities/attribute_set.c:415–440  ·  view source on GitHub ↗

free attribute set

Source from the content-addressed store, hash-verified

413
414// free attribute set
415void AttributeSet_Free
416(
417 AttributeSet *set // set to be freed
418) {
419 ASSERT(set != NULL);
420
421 AttributeSet _set = *set;
422
423 // return if set is read-only
424 if(unlikely(ATTRIBUTE_SET_IS_READONLY(_set))) {
425 return;
426 }
427
428 // return if set is NULL
429 if(_set == NULL) {
430 return;
431 }
432
433 // free all allocated properties
434 for(uint16_t i = 0; i < _set->attr_count; ++i) {
435 SIValue_Free(_set->attributes[i].value);
436 }
437
438 rm_free(_set);
439 *set = NULL;
440}
441

Callers 11

UndoLog_FreeOpFunction · 0.85
UpdateNodePropertyFunction · 0.85
UpdateEdgePropertyFunction · 0.85
_Graph_FreeFunction · 0.85
_AttributeSet_RemoveFunction · 0.85
EvalEntityUpdatesFunction · 0.85
PendingUpdateCtx_FreeFunction · 0.85
PendingCreationsFreeFunction · 0.85

Calls 2

SIValue_FreeFunction · 0.85
rm_freeFunction · 0.85

Tested by

no test coverage detected