Prevent OOM

This commit is contained in:
2026-06-18 05:55:31 +10:00
parent ebba70b9d9
commit b3436a61ee
44 changed files with 1797 additions and 66 deletions
@@ -162,7 +162,7 @@ bool PaddleOCRV5Engine::Initialize(const std::string& detModelPath,
// Ensure this DLL's copy of Ort::Global<void>::api_ is initialized.
// BasicOrtHandler sets it in ONNXEngine.dll, but each DLL has its own
// inline-static copy. Without this, inference calls from ANSOCR.dll crash.
if (Ort::Global<void>::api_ == nullptr) {
if (Ort::detail::Global::Api() == nullptr) {
Ort::InitApi(static_cast<const OrtApi*>(EPLoader::GetOrtApiRaw()));
}