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
+14 -1
View File
@@ -205,6 +205,16 @@ namespace ANSCENTER {
// ====================================================================
class ANSENGINE_API ANSONNXYOLO : public ANSODBase {
public:
// Explicit non-copy/non-move. The class has atomic + shared_ptr members
// that already implicitly delete these, but __declspec(dllexport)
// makes ClangCL eagerly instantiate the implicit copy/move ctor
// bodies; an explicit user-declared =delete short-circuits that.
ANSONNXYOLO(const ANSONNXYOLO&) = delete;
ANSONNXYOLO& operator=(const ANSONNXYOLO&) = delete;
ANSONNXYOLO(ANSONNXYOLO&&) = delete;
ANSONNXYOLO& operator=(ANSONNXYOLO&&) = delete;
ANSONNXYOLO() = default;
bool Initialize(std::string licenseKey, ModelConfig modelConfig,
const std::string& modelZipFilePath,
const std::string& modelZipPassword,
@@ -254,7 +264,10 @@ namespace ANSCENTER {
// caught a DML E_FAIL and rebuilt the session — that was the
// 0xc0000005 access violation observed in ANSODEngine.dll under
// AMD/DirectML when multiple AI tasks ran in parallel.
std::shared_ptr<ONNXYOLO> m_ortEngine;
// Elaborated `class ONNXYOLO` disambiguates from the
// ANSCENTER::ModelType::ONNXYOLO enumerator (ANSLicense.h) which
// shares the same unqualified name in this namespace.
std::shared_ptr<class ONNXYOLO> m_ortEngine;
// ────────────────────────────────────────────────────────────────
// DML stay-on-GPU recovery state.