aboutsummaryrefslogtreecommitdiffstats
path: root/CNativeCode/MemoryManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'CNativeCode/MemoryManager.h')
-rw-r--r--CNativeCode/MemoryManager.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/CNativeCode/MemoryManager.h b/CNativeCode/MemoryManager.h
new file mode 100644
index 0000000..51271ce
--- /dev/null
+++ b/CNativeCode/MemoryManager.h
@@ -0,0 +1,25 @@
+#ifndef MEMORYMANAGER
+ #define MEMORYMANAGER
+
+ #include "jnitools.h"
+
+ typedef enum { MEMM_TESSELATOR,
+ MEMM_SELECTION,
+ MEMM_LAST
+ } ListType;
+
+ #define NUMBER_OF_LISTS ((int)MEMM_LAST)
+
+ typedef struct tnode {
+ void *java_array;
+ void *native_array;
+ JavaBasicType type;
+ void *next;
+ } ArrayList;
+
+ void RegisterArray(JNIEnv *env, void *java_array, void *native_array,
+ JavaBasicType array_type, ListType ltype);
+
+ void FreeArrays(JNIEnv *env, ListType ltype);
+
+#endif