Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a190ecb6 authored by Steven Moreland's avatar Steven Moreland
Browse files

RefBase: document leak memory case

We should fix the leak, but it introduces the possibility
that something is use this. Instead, document best practice
(not to allocate RefBase objects on the stack).

Fixes: 295340906
Test: N/A
Change-Id: Ife7a561f790dc687fb99b73729818e61834fa272
parent 097b607a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -787,7 +787,7 @@ RefBase::~RefBase()
            // sp<T>(T*) constructor, assuming that if the object is around, it is already
            // owned by an sp<>.
            ALOGW("RefBase: Explicit destruction, weak count = %d (in %p). Use sp<> to manage this "
                  "object.",
                  "object. Note - if weak count is 0, this leaks mRefs (weakref_impl).",
                  mRefs->mWeak.load(), this);

#if ANDROID_UTILS_CALLSTACK_ENABLED