From: Sung-Jin Park Date: Wed, 22 Jul 2020 05:49:45 +0000 (+0900) Subject: DSWaylandCompositor: fix log message when get/release an instance X-Git-Tag: accepted/tizen/unified/20200820.213435~223 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b2cdf9b9eaa4fd11bc02ee46f0c7f274dc3dcde;p=platform%2Fcore%2Fuifw%2Flibds.git DSWaylandCompositor: fix log message when get/release an instance Change-Id: I0c698f7e5e259a8d142acc9a916c301cedd6467a Signed-off-by: Sung-Jin Park --- 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 !"); } }