Fix memory leak of RSExport* object create in processExport(). Now, they will
properly be freed after their associated RSContext was destroyed.
diff --git a/slang_rs_exportable.h b/slang_rs_exportable.h
new file mode 100644
index 0000000..2945b40
--- /dev/null
+++ b/slang_rs_exportable.h
@@ -0,0 +1,33 @@
+#ifndef _SLANG_COMPILER_RS_EXPORTABLE_HPP
+#define _SLANG_COMPILER_RS_EXPORTABLE_HPP
+
+#include "slang_rs_context.h"
+
+namespace slang {
+
+class RSExportable {
+public:
+  enum Kind {
+    EX_FUNC,
+    EX_TYPE,
+    EX_VAR
+  };
+
+private:
+  Kind mK;
+
+protected:
+  RSExportable(RSContext *Context, RSExportable::Kind K) : mK(K) {
+    Context->newExportable(this);
+    return;
+  }
+
+public:
+  inline Kind getKind() const { return mK; }
+
+  virtual ~RSExportable() { }
+};
+
+}
+
+#endif  // _SLANG_COMPILER_RS_EXPORTABLE_HPP