Improved object lifecycle tracking and fix leaks.
diff --git a/rsProgramVertex.h b/rsProgramVertex.h
index b3a8b8d..e198f23 100644
--- a/rsProgramVertex.h
+++ b/rsProgramVertex.h
@@ -59,12 +59,13 @@
     ~ProgramVertexState();
 
     void init(Context *rsc, int32_t w, int32_t h);
+    void deinit(Context *rsc);
 
     ObjectBaseRef<ProgramVertex> mDefault;
     ObjectBaseRef<ProgramVertex> mLast;
     ObjectBaseRef<Allocation> mDefaultAlloc;
 
-    RsType mAllocType;
+    ObjectBaseRef<Type> mAllocType;
 
     ProgramVertex *mPV;