Skip to content

Commit 634e8b1

Browse files
committed
Make ReferenceCounter logs put the instance
Not quite sure why it was set to always log "ReferenceCounter(0)" rather than using this... but this will be easier to use in a debugging situation.
1 parent e8909ce commit 634e8b1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

mythtv/libs/libmythbase/referencecounter.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@ void ReferenceCounter::UpRef(void)
1414
{
1515
QMutexLocker mlock(&m_refLock);
1616
m_refCount++;
17-
LOG(VB_GENERAL, LOG_DEBUG, QString("%1(%2)::UpRef() -> %3")
17+
LOG(VB_GENERAL, LOG_DEBUG, QString("%1(0x%2)::UpRef() -> %3")
1818
.arg(metaObject()->className())
19-
// .arg(QString::number((uint)this))
20-
.arg("0")
19+
.arg((uint64_t)this,0,16)
2120
.arg(QString::number(m_refCount)));
2221
}
2322

2423
bool ReferenceCounter::DownRef(void)
2524
{
2625
m_refLock.lock();
2726
m_refCount--;
28-
LOG(VB_GENERAL, LOG_DEBUG, QString("%1(%2)::DownRef() -> %3")
27+
LOG(VB_GENERAL, LOG_DEBUG, QString("%1(0x%2)::DownRef() -> %3")
2928
.arg(metaObject()->className())
30-
// .arg(QString::number((uint)this))
31-
.arg("0")
29+
.arg((uint64_t)this,0,16)
3230
.arg(QString::number(m_refCount)));
3331

3432
if (m_refCount == 0)

0 commit comments

Comments
 (0)