1 //------------------------------------------------------------------------------ 2 // GB_Pending_free: free a list of pending tuples 3 //------------------------------------------------------------------------------ 4 5 // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 6 // SPDX-License-Identifier: Apache-2.0 7 8 //------------------------------------------------------------------------------ 9 10 #include "GB_Pending.h" 11 GB_Pending_free(GB_Pending * PHandle)12void GB_Pending_free // free a list of pending tuples 13 ( 14 GB_Pending *PHandle 15 ) 16 { 17 18 //-------------------------------------------------------------------------- 19 // check inputs 20 //-------------------------------------------------------------------------- 21 22 ASSERT (PHandle != NULL) ; 23 24 //-------------------------------------------------------------------------- 25 // free all pending tuples 26 //-------------------------------------------------------------------------- 27 28 GB_Pending Pending = (*PHandle) ; 29 if (Pending != NULL) 30 { 31 GB_FREE (&(Pending->i), Pending->i_size) ; 32 GB_FREE (&(Pending->j), Pending->j_size) ; 33 GB_FREE (&(Pending->x), Pending->x_size) ; 34 GB_FREE (&(Pending), Pending->header_size) ; 35 } 36 37 (*PHandle) = NULL ; 38 } 39 40