int vsip_randdestroy(vsip_randstate *state);
This function destroys the random number generator state state and frees all associated resources. After calling this function, the random number generator state should no longer be used.
vsip_randstate* state: Pointer to the random number generator state to be destroyed.
Returns 0 on success.
Returns a non-zero value on error.
vsip_randstate *rand_state; int result; // Assuming rand_state has been properly initialized result = vsip_randdestroy(rand_state); if (result != 0) { // Handle error }