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

Commit 3bbb5e9a authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change Ib7a6c434 into eclair

* changes:
  Fix some leaks.  This fixes the major malloc memory leak in allApps.  Still tracking some much more minor issues.
parents afd81beb b7a6c434
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ Allocation::Allocation(Context *rsc, const Type *type) : ObjectBase(rsc)

Allocation::~Allocation()
{
    free(mPtr);
    mPtr = NULL;
}

void Allocation::setCpuWritable(bool)
+3 −0
Original line number Diff line number Diff line
@@ -350,6 +350,7 @@ void * Context::threadProc(void *vrsc)
     rsc->deinitEGL();
     pthread_mutex_unlock(&gInitMutex);

     rsc->mObjDestroy.mNeedToEmpty = true;
     rsc->objDestroyOOBRun();
     LOGV("RS Thread exited");
     return NULL;
@@ -421,6 +422,7 @@ Context::~Context()

    mIO.shutdown();
    int status = pthread_join(mThreadId, &res);
    mObjDestroy.mNeedToEmpty = true;
    objDestroyOOBRun();

    // Global structure cleanup.
@@ -431,6 +433,7 @@ Context::~Context()
        if (!gThreadTLSKeyCount) {
            pthread_key_delete(gThreadTLSKey);
        }
        mDev = NULL;
    }
    pthread_mutex_unlock(&gInitMutex);

+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ ObjectBase::~ObjectBase()
    rsAssert(!mUserRefCount);
    rsAssert(!mSysRefCount);
    remove();
    delete[] mName;
}

void ObjectBase::dumpLOGV(const char *op) const
+2 −0
Original line number Diff line number Diff line
@@ -99,6 +99,8 @@ SimpleMeshContext::SimpleMeshContext()

SimpleMeshContext::~SimpleMeshContext()
{
    delete[] mVertexTypes;
    delete[] mVertexBuffers;
}


+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ TypeState::TypeState()

TypeState::~TypeState()
{
    delete[] mLODs;
}

size_t Type::getOffsetForFace(uint32_t face) const