Delete the acc script when deleting the Renderscript rsScriptC object.
Previously we had been leaking the ACCscript object.
diff --git a/rsScriptC.h b/rsScriptC.h
index f35a130..c58dcf9 100644
--- a/rsScriptC.h
+++ b/rsScriptC.h
@@ -21,11 +21,13 @@
#include "RenderScriptEnv.h"
+struct ACCscript;
+
// ---------------------------------------------------------------------------
namespace android {
namespace renderscript {
-
+
class ScriptC : public Script
{
@@ -38,6 +40,7 @@
virtual void run(Context *, uint32_t launchID);
+ ACCscript* mAccScript;
rsc_RunScript mScript;
@@ -48,13 +51,13 @@
};
-class ScriptCState
+class ScriptCState
{
public:
ScriptCState();
~ScriptCState();
-
+ ACCscript* mAccScript;
rsc_RunScript mScript;
float mClearColor[4];
float mClearDepth;