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

Commit 84035ff6 authored by Jason Sams's avatar Jason Sams
Browse files

Fix cleanup race condition where objects might may not

be cleaned up correctly.

Change-Id: Ia48e06c3d050b6b39b39f8fdc9f0eb89b92fe1bf
parent ccf9d10b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -539,6 +539,7 @@ void Context::destroyWorkerThreadResources() {
    }
    ObjectBase::zeroAllUserRef(this);
    LOGV("destroyWorkerThreadResources 2");
    mExit = true;
}

void * Context::helperThreadProc(void *vrsc) {
@@ -713,6 +714,9 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) {

Context::~Context() {
    LOGV("Context::~Context");

    mIO.mToCore.flush();
    rsAssert(mExit);
    mExit = true;
    mPaused = false;
    void *res;