Improve renderscript context teardown. Track object in the system and then force their cleanup by releasing all user references once destroy context is called. Java layer will no longer send destroy notifications for objects garbage collected once a context is destroyed.
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 0a886cd..28a9de2 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -145,6 +145,8 @@
bool logTimes;
+ mutable const ObjectBase * mObjHead;
+
protected:
Device *mDev;