Add object validity checking.

Change-Id: I2613e87b09a6e560f0381d4ed620d60a10bc30e4
diff --git a/rsObjectBase.h b/rsObjectBase.h
index ad95b81..59fb4a6 100644
--- a/rsObjectBase.h
+++ b/rsObjectBase.h
@@ -56,6 +56,8 @@
     virtual void serialize(OStream *stream) const = 0;
     virtual RsA3DClassID getClassId() const = 0;
 
+    static bool isValid(const Context *rsc, const ObjectBase *obj);
+
 protected:
     const char *mAllocFile;
     uint32_t mAllocLine;