ZIP_SOURCE_FREE(3)

πŸ“¦
version 1.11.4 Β· 4 versions
, in arch rolling, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– ZIP_SOURCE_FREE(3) πŸ’–

okay bestie, welcome to the libzip section of the group chat, this one is short but she is important 🫢


✨ NAME ✨

zip_source_free β€” free zip data source πŸ’…

πŸ“š LIBRARY πŸ“š

libzip (-lzip) 🌸

πŸŽ€ SYNOPSIS πŸŽ€

#include <zip.h>

void
zip_source_free(zip_source_t *source);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. zip_source_free() does the classic refcount girlie thing: it decrements the reference count of source, and if that count drops allll the way down to 0, she frees it. bye babe πŸ‘‹βœ¨

and if source is NULL? literally nothing happens. no crash, no drama, she just. does nothing. iconic behaviour honestly πŸ’…

⚠️ NOTE, and this one is fr fr important bestie: you should not call this function on a source after it was used successfully in a zip_open_from_source(3), zip_file_add(3), or zip_file_replace(3) call. like, once those functions have taken your source and succeeded, that source is theirs now. hands off. no cap. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ HISTORY πŸ‘‘

zip_source_free() was added in libzip 0.6. a whole era. a moment. 🌈


πŸ’œ AUTHORS πŸ’œ

Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β€” the literal main characters who made this happen 🧚✨


and that's the whole page bestie!! this one came from the Debian build of the manual, dated December 18, 2017, and it's filed under ZIP_SOURCE_FREE(3) in the Library Functions Manual πŸ’– mwah, go forth and manage your reference counts responsibly πŸŽ€πŸ¦‹β­

πŸ“¦ where this page comes from