diff --git a/base/src/refbase.cpp b/base/src/refbase.cpp index ffeed577c81da710a7f7b4c145e129dd77981a67..317c450f27308ca709e7aa97d90252e212586123 100644 --- a/base/src/refbase.cpp +++ b/base/src/refbase.cpp @@ -14,8 +14,8 @@ */ #include "refbase.h" -#ifdef DEBUG_REFBASE #include "utils_log.h" +#ifdef DEBUG_REFBASE #include #endif @@ -426,6 +426,7 @@ RefBase::RefBase(const RefBase &) void RefBase::RefPtrCallback() { + UTILS_LOGE("RefBase delete addr: %{public}p", this); delete this; } @@ -529,6 +530,7 @@ void RefBase::DecStrongRef(const void *objectId) const int curCount = refs->DecStrongRefCount(objectId); if (curCount == 1) { OnLastStrongRef(objectId); + UTILS_LOGE("RefBase curCount=1 addr: %{public}p", this); if (!refs->IsLifeTimeExtended()) { if (refs->callback_) { refs->callback_();