From b38d534873ca514f5a5230596c838aa37eca1568 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Thu, 21 Oct 2010 14:06:55 -0700 Subject: Fix refcounting bugs where the sys refcount could be corrupted during async type creation. Change-Id: If42828e92990598b0cb5da81c82ea513f94725f2 Fix stack object deletion bug. Change-Id: I2c723aa5ad15e0c99dc9cd0cfbc7db80bace172a --- libs/rs/rsScriptC.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libs/rs/rsScriptC.cpp') diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index a2910d7e75d1..165fa7155a25 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -35,8 +35,6 @@ using namespace android::renderscript; ScriptC::ScriptC(Context *rsc) : Script(rsc) { - mAllocFile = __FILE__; - mAllocLine = __LINE__; mBccScript = NULL; memset(&mProgram, 0, sizeof(mProgram)); } @@ -524,11 +522,11 @@ RsScript rsi_ScriptCCreate(Context * rsc) { ScriptCState *ss = &rsc->mScriptC; - ObjectBaseRef s = ss->mScript.get(); + ObjectBaseRef s(ss->mScript); ss->mScript.clear(); + s->incUserRef(); ss->runCompiler(rsc, s.get()); - s->incUserRef(); ss->clear(rsc); return s.get(); } -- cgit v1.2.3-59-g8ed1b