summaryrefslogtreecommitdiff
path: root/libs/rs/rsScript.cpp
diff options
context:
space:
mode:
author Stephen Hines <srhines@google.com> 2011-08-31 17:41:39 -0700
committer Stephen Hines <srhines@google.com> 2011-08-31 17:41:39 -0700
commit514f9790fdf180ca3c58e508cbd36c520fa7be08 (patch)
tree411f9a35d32c4e65528b4eb31b78b10acd426ded /libs/rs/rsScript.cpp
parent9b718682ed8fd06e38598f1a0a24d42025e9267d (diff)
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 'libs/rs/rsScript.cpp')
-rw-r--r--libs/rs/rsScript.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp
index f62c72edfe21..93513fe3e6a5 100644
--- a/libs/rs/rsScript.cpp
+++ b/libs/rs/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 {