I was reviewing our latest curl nbdkit plugin, and one remaining issue is this:
https://gitlab.com/nbdkit/nbdkit/-/blob/201d65063795f492ea86dd8f561dfcab1cd447ac/plugins/curl/worker.c#L68 Basically we have to maintain our own shadow list of the easy handles that we have added to the multi. The only reason we need to do this is so that in case we close the plugin early, we can iterate over the easy handles which are still open and free them. It seems like the multi "knows" what easy handles it contains already (multi->easyp), so we shouldn't have to maintain this list ourselves. However I couldn't see anything in the API to access this. https://github.com/curl/curl/blob/c2212c05aa99bb31e4b99b0b66fc1747b7d01be6/lib/multihandle.h#L92 Alternatively, could there be an operation which frees up the multi handle and any also frees the easy handles that it contains? (curl_multi_cleanup removes the easy handles from the multi, but doesn't free them.) https://curl.se/libcurl/c/curl_multi_cleanup.html Am I missing something or is this something that could be added? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html