Function rc_vector_empty#

Function Documentation#

rc_vector_t rc_vector_empty(void)#

Returns an rc_vector_t with no allocated memory and the initialized flag set to 0.

This is essential for initializing vectors when they are declared since local variables declared in a function without global variable scope in C are not guaranteed to be zeroed out which can lead to bad memory pointers and segfaults if not handled carefully. We recommend initializing all vectors with this function before using rc_vector_alloc or any other function.

Returns:

rc_vector_t with no allocated memory and the initialized flag set to 0.