From 0b2cdf9b9eaa4fd11bc02ee46f0c7f274dc3dcde Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Wed, 22 Jul 2020 14:49:45 +0900 Subject: [PATCH] DSWaylandCompositor: fix log message when get/release an instance Change-Id: I0c698f7e5e259a8d142acc9a916c301cedd6467a Signed-off-by: Sung-Jin Park --- src/DSWaylandServer/DSWaylandCompositor.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/DSWaylandServer/DSWaylandCompositor.cpp b/src/DSWaylandServer/DSWaylandCompositor.cpp index fcbefa4..7951ca4 100644 --- a/src/DSWaylandServer/DSWaylandCompositor.cpp +++ b/src/DSWaylandServer/DSWaylandCompositor.cpp @@ -252,15 +252,16 @@ DSWaylandCompositor *DSWaylandCompositor::getInstance() { std::lock_guard tLock(__mutex); + DSLOG_INF("DSWaylandCompositor", + "[Get] instance __refCount=%d !", __refCount); + if (!__comp && (__refCount == 0)) { __comp = new DSWaylandCompositor(new DSObject); DSLOG_INF("DSWaylandCompositor", - "Get instance has been created !"); + "DSWaylandCompositor instance has been created !"); } - DSLOG_INF("DSWaylandCompositor", - "DSWaylandCompositor instance __refCount=%d !", __refCount); ++__refCount; return __comp; } @@ -274,14 +275,14 @@ void DSWaylandCompositor::releaseInstance() if (__refCount < 0) __refCount = 0; DSLOG_INF("DSWaylandCompositor", - "Release instance __refCount=%d !", __refCount); + "[Release] instance __refCount=%d !", __refCount); if ((0 == __refCount) && __comp) { delete __comp; __comp = nullptr; DSLOG_INF("DSWaylandCompositor", - "DSWaylandCompositor instance has been deleted !"); + "DSWaylandCompositor instance has been removed !"); } } -- 2.7.4