From 9d5e03db9929271f56ac4a0078d9474d7011efcd Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Tue, 3 Nov 2009 11:25:42 -0800 Subject: Fix RS bugs. We were holding a pointer to the script text from the java vm. Move freeing of objects to before context teardown to allow allocations to clean up their data. --- libs/rs/rsContext.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libs/rs/rsContext.cpp') diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 961ec0b..2e6d7b0 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -342,6 +342,9 @@ void * Context::threadProc(void *vrsc) rsc->mStateFragmentStore.deinit(rsc); ObjectBase::zeroAllUserRef(rsc); + rsc->mObjDestroy.mNeedToEmpty = true; + rsc->objDestroyOOBRun(); + glClearColor(0,0,0,0); glClear(GL_COLOR_BUFFER_BIT); eglSwapBuffers(rsc->mEGL.mDisplay, rsc->mEGL.mSurface); @@ -350,8 +353,6 @@ void * Context::threadProc(void *vrsc) rsc->deinitEGL(); pthread_mutex_unlock(&gInitMutex); - rsc->mObjDestroy.mNeedToEmpty = true; - rsc->objDestroyOOBRun(); LOGV("RS Thread exited"); return NULL; } -- cgit v1.1