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

Function GrB_Descriptor_free

deps/GraphBLAS/Source/GrB_Descriptor_free.c:15–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include "GB.h"
14
15GrB_Info GrB_Descriptor_free // free a descriptor
16(
17 GrB_Descriptor *descriptor // handle of descriptor to free
18)
19{
20
21 if (descriptor != NULL)
22 {
23 // only free a dynamically-allocated operator
24 GrB_Descriptor desc = *descriptor ;
25 if (desc != NULL)
26 {
27 size_t header_size = desc->header_size ;
28 if (header_size > 0)
29 {
30 GB_FREE (&(desc->logger), desc->logger_size) ;
31 desc->logger_size = 0 ;
32 desc->magic = GB_FREED ; // to help detect dangling pointers
33 desc->header_size = 0 ;
34 GB_FREE (descriptor, header_size) ;
35 }
36 }
37 }
38
39 return (GrB_SUCCESS) ;
40}
41

Callers 15

mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85
mexFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected