本文整理汇总了C++中BloatEntry::Dtor方法的典型用法代码示例。如果您正苦于以下问题:C++ BloatEntry::Dtor方法的具体用法?C++ BloatEntry::Dtor怎么用?C++ BloatEntry::Dtor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BloatEntry
的用法示例。
在下文中一共展示了BloatEntry::Dtor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitTraceLog
NS_LogRelease(void* aPtr, nsrefcnt aRefcnt, const char* aClass)
{
#ifdef NS_IMPL_REFCNT_LOGGING
ASSERT_ACTIVITY_IS_LEGAL;
if (!gInitialized) {
InitTraceLog();
}
if (gLogging == NoLogging) {
return;
}
if (aRefcnt == 0 || gLogging == FullLogging) {
LOCK_TRACELOG();
if (aRefcnt == 0 && gBloatLog) {
BloatEntry* entry = GetBloatEntry(aClass, 0);
if (entry) {
entry->Dtor();
}
}
bool loggingThisType = (!gTypesToLog || LogThisType(aClass));
intptr_t serialno = 0;
if (gSerialNumbers && loggingThisType) {
serialno = GetSerialNumber(aPtr, false);
NS_ASSERTION(serialno != 0,
"Serial number requested for unrecognized pointer! "
"Are you memmoving a refcounted object?");
int32_t* count = GetRefCount(aPtr);
if (count) {
(*count)--;
}
}
bool loggingThisObject = (!gObjectsToLog || LogThisObj(serialno));
if (gRefcntsLog && loggingThisType && loggingThisObject) {
// Can't use PR_LOG(), b/c it truncates the line
fprintf(gRefcntsLog,
"\n<%s> %p %" PRIuPTR " Release %" PRIuPTR "\n",
aClass, aPtr, serialno, aRefcnt);
nsTraceRefcnt::WalkTheStackCached(gRefcntsLog);
fflush(gRefcntsLog);
}
// Here's the case where MOZ_COUNT_DTOR was not used,
// yet we still want to see deletion information:
if (aRefcnt == 0 && gAllocLog && loggingThisType && loggingThisObject) {
fprintf(gAllocLog, "\n<%s> %p %" PRIdPTR " Destroy\n", aClass, aPtr, serialno);
nsTraceRefcnt::WalkTheStackCached(gAllocLog);
}
if (aRefcnt == 0 && gSerialNumbers && loggingThisType) {
RecycleSerialNumberPtr(aPtr);
}
UNLOCK_TRACELOG();
}
#endif
}