diff --git a/src/bindings/c/include/openvino/c/ov_core.h b/src/bindings/c/include/openvino/c/ov_core.h index d0c1fcf3053..45bbeb35da6 100644 --- a/src/bindings/c/include/openvino/c/ov_core.h +++ b/src/bindings/c/include/openvino/c/ov_core.h @@ -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(); diff --git a/src/bindings/c/src/ov_core.cpp b/src/bindings/c/src/ov_core.cpp index a97d6a51a4a..6e292dc7abf 100644 --- a/src/bindings/c/src/ov_core.cpp +++ b/src/bindings/c/src/ov_core.cpp @@ -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(); +}