1# zx_handle_close_many 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7handle_close_many - close a number of handles 8 9## SYNOPSIS 10 11<!-- Updated by update-docs-from-abigen, do not edit. --> 12 13``` 14#include <zircon/syscalls.h> 15 16zx_status_t zx_handle_close_many(const zx_handle_t* handles, 17 size_t num_handles); 18``` 19 20## DESCRIPTION 21 22`zx_handle_close_many()` closes a number of handles, causing each 23underlying object to be reclaimed by the kernel if no other handles to 24it exist. 25 26If a handle was used in a pending [`zx_object_wait_one()`] or a 27[`zx_object_wait_many()`] call, the wait will be aborted. 28 29This operation closes all handles presented to it, even if one or more 30of the handles is duplicate or invalid. 31 32It is not an error to close the special "never a valid handle" **ZX_HANDLE_INVALID**, 33similar to `free(NULL)` being a valid call. 34 35## RIGHTS 36 37<!-- Updated by update-docs-from-abigen, do not edit. --> 38 39None. 40 41## RETURN VALUE 42 43`zx_handle_close_many()` returns **ZX_OK** on success. 44 45## ERRORS 46 47**ZX_ERR_BAD_HANDLE** One of the *handles* isn't a valid handle, or the same handle is 48present multiple times. 49 50## SEE ALSO 51 52 - [`zx_handle_close()`] 53 - [`zx_handle_duplicate()`] 54 - [`zx_handle_replace()`] 55 56<!-- References updated by update-docs-from-abigen, do not edit. --> 57 58[`zx_handle_close()`]: handle_close.md 59[`zx_handle_duplicate()`]: handle_duplicate.md 60[`zx_handle_replace()`]: handle_replace.md 61[`zx_object_wait_many()`]: object_wait_many.md 62[`zx_object_wait_one()`]: object_wait_one.md 63