summaryrefslogtreecommitdiff
path: root/libs/rs/rsContext.cpp
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2009-11-02 15:22:34 -0800
committer Android Git Automerger <android-git-automerger@android.com> 2009-11-02 15:22:34 -0800
commit43b5a566442f2f15cbc04d2ac2c7e2169d10d8bd (patch)
treed0d5fc560e12eb62fcc3772fa06c473fbf30b7e5 /libs/rs/rsContext.cpp
parentcb93e01f4c474177a2a3d9d02f5b21329a1aed5e (diff)
parent766df995e30caa054cc25068e55f160c765590eb (diff)
am 766df995: am d31b0e44: am 3bbb5e9a: Merge change Ib7a6c434 into eclair
Merge commit '766df995e30caa054cc25068e55f160c765590eb' * commit '766df995e30caa054cc25068e55f160c765590eb': Fix some leaks. This fixes the major malloc memory leak in allApps. Still tracking some much more minor issues.
Diffstat (limited to 'libs/rs/rsContext.cpp')
-rw-r--r--libs/rs/rsContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index abe7b4a0930e..40e3c4ad5f63 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -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);