Improved object lifecycle tracking and fix leaks.
diff --git a/libs/rs/rsProgramFragmentStore.cpp b/libs/rs/rsProgramFragmentStore.cpp
index 39802c7..de33d9c 100644
--- a/libs/rs/rsProgramFragmentStore.cpp
+++ b/libs/rs/rsProgramFragmentStore.cpp
@@ -27,6 +27,8 @@
ProgramFragmentStore::ProgramFragmentStore(Context *rsc, Element *in, Element *out) :
Program(rsc, in, out)
{
+ mAllocFile = __FILE__;
+ mAllocLine = __LINE__;
mDitherEnable = true;
mBlendEnable = false;
mColorRWriteEnable = true;
@@ -217,6 +219,12 @@
mDefault.set(pfs);
}
+void ProgramFragmentStoreState::deinit(Context *rsc)
+{
+ mDefault.clear();
+ mLast.clear();
+}
+
namespace android {
namespace renderscript {