[C API] add ov_shutdown API (#20305)

This commit is contained in:
River Li 2023-10-09 16:36:52 +08:00 committed by GitHub
parent e1faf3ddd0
commit 20a3a599da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -413,3 +413,14 @@ ov_core_compile_model_with_context(const ov_core_t* core,
*/
OPENVINO_C_API(ov_status_e)
ov_core_get_default_context(const ov_core_t* core, const char* device_name, ov_remote_context_t** context);
/**
* @brief Shut down the OpenVINO by deleting all static-duration objects allocated by the library and releasing
* dependent resources
* @ingroup ov_c_api
* @note This function should be used by advanced user to control unload the resources.
*
* You might want to use this function if you are developing a dynamically-loaded library which should clean up all
* resources after itself when the library is unloaded.
*/
OPENVINO_C_API(void) ov_shutdown();

View File

@ -448,3 +448,7 @@ ov_status_e ov_core_get_default_context(const ov_core_t* core, const char* devic
CATCH_OV_EXCEPTIONS
return ov_status_e::OK;
}
void ov_shutdown() {
ov::shutdown();
}