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

Commit 8e26a28f authored by Robert Carr's avatar Robert Carr
Browse files

ViewRootImpl: Explicitly release BLASTBufferQueue

If we rely on the finalizer we may end up keeping buffers alive
for a long time, and introduce OOM in some window creation stress tests.

Bug: 168506246
Test: Existing tests pass
Change-Id: Iaee579cdff96f1020a4904f89b876b726ecabd08
parent b92fec61
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1886,9 +1886,11 @@ public final class ViewRootImpl implements ViewParent,
        mSurface.release();
        mSurfaceControl.release();

        // We should probably add an explicit dispose.
        if (mBlastBufferQueue != null) {
            mBlastBufferQueue.destroy();
            mBlastBufferQueue = null;
        }
    }

    /**
     * Block the input events during an Activity Transition. The KEYCODE_BACK event is allowed