Prevent OOM
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user