summaryrefslogtreecommitdiff
path: root/rsScript.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2011-08-31 17:41:39 -0700
committerStephen Hines <srhines@google.com>2011-08-31 17:41:39 -0700
commit4ee16ffbd9d1d72e1757c9b26715597fdc044117 (patch)
treecb8b607c455d5661ca2e57c8bd0e823dedcf0705 /rsScript.cpp
parentd5dccb8c49d8da069f2630c4ac9c0e2d14958a88 (diff)
downloadrs-4ee16ffbd9d1d72e1757c9b26715597fdc044117.tar.gz
Call .rs.dtor() when tearing down Scripts.
BUG=5186750 This allows us to properly reference count any globals (static or extern) that need to potentially be cleaned up. Change-Id: I03d2c38c1e7a4ca96c40003d2eeecb6f395d5835
Diffstat (limited to 'rsScript.cpp')
-rw-r--r--rsScript.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/rsScript.cpp b/rsScript.cpp
index f62c72ed..93513fe3 100644
--- a/rsScript.cpp
+++ b/rsScript.cpp
@@ -72,6 +72,12 @@ void Script::setVarObj(uint32_t slot, ObjectBase *val) {
mRSC->mHal.funcs.script.setGlobalObj(mRSC, this, slot, val);
}
+bool Script::freeChildren() {
+ incSysRef();
+ mRSC->mHal.funcs.script.invokeFreeChildren(mRSC, this);
+ return decSysRef();
+}
+
namespace android {
namespace renderscript {