When to free zip_source?,
- Re: When to free zip_source?, Dieter Baron (2017/11/01 09:23:34)
No, zip_file_add transfers ownership of my_zip_source to libzip. It will be freed when libzip no longer needs it.
See also this paragraph from zip_source_free(3):
NOTE: This function should not be called 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.
Yes. We should probably add a similar paragraph to the man pages for zip_file_add() and zip_file_replaece().
state should read userdata, I’ve fixed it in the man page.
When a source is freed with zip_source_free(), it’s callback is called with the command ZIP_SOURCE_FREE.
Made by MHonArc.