vrb_destroy(3)

πŸ“¦ version 0.5.1, in nixos 26.05

πŸ’… vrb_destroy β€” destroy a virtual ring buffer

okay so this is vrb_destroy(3) from the VRB Programmer's Manual, and honestly it's the chillest little cleanup function you'll ever meet. bestie, it's the end-of-the-hangout function β€” the "okay love you, text me when you're home" of the virtual ring buffer world 🫢


πŸ“š LIBRARY

-lvrb β€” that's the girl. link her or you get nothing ✨


🧚 SYNOPSIS

#include <vrb.h>

vrb_p vrb_destroy(vrb_p vrb);

🌸 DESCRIPTION

so vrb_destroy destroys an instance of a virtual ring buffer that was created by vrb_new(3). it's giving full closure πŸ’€

when your program has no more need for the virtual ring buffer, you should call vrb_destroy(3) to release all resources. all of them. every last one. that's the whole point β€” she's not a hoarder, she's a liberator πŸ‘‘

ngl this is the responsible one in the friend group. please don't ghost your ring buffers. they deserve better.

πŸŽ€ ARGUMENTS

  • vrb_p vrb β€” specifies the virtual ring buffer to be destroyed. that's the one you're saying goodbye to. literally just hand her the pointer and she handles the rest πŸ’–

⭐ RETURN VALUE

  • int β€” on success, 0 is returned. on error, -1 is returned.

zero means slay. negative one means something went wrong and we need to talk 😭


πŸ’€ ERRORS

if an error is returned, then errno will have the following value:

  • EINVAL β€” an invalid virtual ring buffer pointer was given. yeah... you handed her something that isn't a real ring buffer. not iconic. check your pointer bestie πŸ™ˆ

πŸ‘‘ SEE ALSO

vrb(3), vrb_capacity(3), vrb_data_len(3), vrb_data_ptr(3), vrb_get(3), vrb_get_min(3), vrb_give(3), vrb_init(3), vrb_init_opt(3), vrb_is_empty(3), vrb_is_full(3), vrb_is_not_empty(3), vrb_is_not_full(3), vrb_move(3), vrb_new(3), vrb_new_opt(3), vrb_put(3), vrb_put_all(3), vrb_read(3), vrb_read_min(3), vrb_resize(3), vrb_space_len(3), vrb_space_ptr(3), vrb_take(3), vrb_uninit(3), vrb_write(3), vrb_write_min(3)


and that's the whole page, bestie πŸ’œ this one's from the vrb manual set and it's dated 2002-09-30 β€” yes, she's vintage, and yes, she still ate. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from