Skip to content

Commit baf1103

Browse files
committed
Move ReferenceCount debugging to new verbose level
Removed the conditional compile and replaced with the new VB_REFCOUNT to allow the selective enabling and disabling of the log messages at runtime.
1 parent a710a5f commit baf1103

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

mythtv/libs/libmythbase/referencecounter.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include "referencecounter.h"
66
#include "mythlogging.h"
77

8-
#define DEBUG_REFERENCE_COUNTING 0
9-
108
ReferenceCounter::ReferenceCounter(void) :
119
m_refCount(1)
1210
{
@@ -16,24 +14,20 @@ void ReferenceCounter::UpRef(void)
1614
{
1715
QMutexLocker mlock(&m_refLock);
1816
m_refCount++;
19-
#if DEBUG_REFERENCE_COUNTING
20-
LOG(VB_GENERAL, LOG_DEBUG, QString("%1(0x%2)::UpRef() -> %3")
17+
LOG(VB_REFCOUNT, LOG_DEBUG, QString("%1(0x%2)::UpRef() -> %3")
2118
.arg(metaObject()->className())
2219
.arg((uint64_t)this,0,16)
2320
.arg(QString::number(m_refCount)));
24-
#endif
2521
}
2622

2723
bool ReferenceCounter::DownRef(void)
2824
{
2925
m_refLock.lock();
3026
m_refCount--;
31-
#if DEBUG_REFERENCE_COUNTING
32-
LOG(VB_GENERAL, LOG_DEBUG, QString("%1(0x%2)::DownRef() -> %3")
27+
LOG(VB_REFCOUNT, LOG_DEBUG, QString("%1(0x%2)::DownRef() -> %3")
3328
.arg(metaObject()->className())
3429
.arg((uint64_t)this,0,16)
3530
.arg(QString::number(m_refCount)));
36-
#endif
3731

3832
if (m_refCount == 0)
3933
{

0 commit comments

Comments
 (0)