Function sgx_urts::rsgx_destroy_enclave [−][src]
pub fn rsgx_destroy_enclave(enclave_id: sgx_enclave_id_t) -> SgxError
The function destroys an enclave and frees its associated resources.
Description
The rsgx_destroy_enclave function destroys an enclave and releases its associated resources and invalidates the enclave ID or handle.
The function will block until no other threads are executing inside the enclave.
It is highly recommended that the sgx_destroy_enclave function be called after the application has finished using the enclave to avoid possible deadlocks.
Parameters
enclave_id
An enclave ID or handle that was generated by rsgx_create_enclave.
Requirements
Header: sgx_urts.h
Library: libsgx_urts.a
Errors
SGX_ERROR_INVALID_ENCLAVE_ID
The enclave ID (handle) is not valid. The enclave has not been loaded or the enclave has already been destroyed.