From c8d466f93298d1c7a205b60b56c688646c89302e Mon Sep 17 00:00:00 2001 From: Momoko Kono Date: Tue, 14 Nov 2023 08:00:36 +0900 Subject: [PATCH] added the log in dispose --- src/bb/image-io/rt_u3v.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bb/image-io/rt_u3v.h b/src/bb/image-io/rt_u3v.h index 5856165a..28e36a2e 100644 --- a/src/bb/image-io/rt_u3v.h +++ b/src/bb/image-io/rt_u3v.h @@ -181,16 +181,25 @@ class U3V { } void dispose(){ + log::debug("U3V::dispose() :: is called"); for (auto i=0; i(d.stream_)); + auto end = std::chrono::system_clock::now(); + log::debug("U3V::dispose() :: g_object_unref took {} ms", std::chrono::duration_cast(end-start).count()); + + start = std::chrono::system_clock::now(); g_object_unref(reinterpret_cast(d.device_)); + end = std::chrono::system_clock::now(); + log::debug("U3V::dispose() :: g_object_unref took {} ms", std::chrono::duration_cast(end-start).count()); } devices_.clear(); @@ -201,6 +210,7 @@ class U3V { // TODO: get rid of the following code; no call destructor from the member function. //------------------------------------------------------------------------------------------ instance_.reset(nullptr); + log::debug("U3V::dispose() :: Instance is deleted"); } void SetGain(int32_t sensor_idx, const std::string key, double v) {