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.
This commit is contained in:
@@ -52,6 +52,8 @@ Allocation::Allocation(Context *rsc, const Type *type) : ObjectBase(rsc)
|
||||
|
||||
Allocation::~Allocation()
|
||||
{
|
||||
free(mPtr);
|
||||
mPtr = NULL;
|
||||
}
|
||||
|
||||
void Allocation::setCpuWritable(bool)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ ObjectBase::~ObjectBase()
|
||||
rsAssert(!mUserRefCount);
|
||||
rsAssert(!mSysRefCount);
|
||||
remove();
|
||||
delete[] mName;
|
||||
}
|
||||
|
||||
void ObjectBase::dumpLOGV(const char *op) const
|
||||
|
||||
@@ -99,6 +99,8 @@ SimpleMeshContext::SimpleMeshContext()
|
||||
|
||||
SimpleMeshContext::~SimpleMeshContext()
|
||||
{
|
||||
delete[] mVertexTypes;
|
||||
delete[] mVertexBuffers;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ TypeState::TypeState()
|
||||
|
||||
TypeState::~TypeState()
|
||||
{
|
||||
delete[] mLODs;
|
||||
}
|
||||
|
||||
size_t Type::getOffsetForFace(uint32_t face) const
|
||||
|
||||
Reference in New Issue
Block a user