From: Inki Dae Date: Thu, 7 May 2020 09:14:11 +0000 (+0900) Subject: Fix UNINIT.CTOR.MANY issues X-Git-Tag: submit/tizen/20200508.021019^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F232728%2F2;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git Fix UNINIT.CTOR.MANY issues Change-Id: Ieef228cea4ac43b0da154659ca408b04ab726a35 Signed-off-by: Inki Dae --- diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index 7c5f893..ee277f0 100755 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -41,10 +41,14 @@ namespace Common { InferenceEngineCommon::InferenceEngineCommon() : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGE("ENTER"); + InferenceEngineInI ini; ini.LoadInI(); mSelectedBackendEngine = static_cast(ini.GetSelectedBackendEngine()); @@ -55,20 +59,29 @@ InferenceEngineCommon::InferenceEngineCommon() : InferenceEngineCommon::InferenceEngineCommon(std::string backend) : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGE("ENTER"); + mBackendLibName = "libinference-engine-" + backend + ".so"; + LOGE("LEAVE"); } InferenceEngineCommon::InferenceEngineCommon(inference_backend_type_e backend) : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGE("ENTER"); + SetBackendEngine(backend); LOGI("Backend engine is selected by enum input[%d] set[%d]", backend, mSelectedBackendEngine); LOGE("LEAVE"); @@ -77,13 +90,13 @@ InferenceEngineCommon::InferenceEngineCommon(inference_backend_type_e backend) : InferenceEngineCommon::InferenceEngineCommon(inference_engine_config *config) : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGI("ENTER"); - - mUseProfiler = false; - LOGI("LEAVE"); }