cache insns for fast lookup in mapping.c. based on the idea of Dang Hoang Vu
diff --git a/cs.c b/cs.c
index 47fa14b..52a0d28 100644
--- a/cs.c
+++ b/cs.c
@@ -15,6 +15,7 @@
 
 cs_err (*arch_init[MAX_ARCH])(cs_struct *) = { NULL };
 cs_err (*arch_option[MAX_ARCH]) (cs_struct*, cs_opt_type, size_t value);
+void (*arch_destroy[MAX_ARCH]) (cs_struct*);
 
 unsigned int all_arch = 0;
 
@@ -101,6 +102,9 @@
 	memset(ud, 0, sizeof(*ud));
 	free(ud);
 
+	if (arch_destroy[ud->arch])
+		arch_destroy[ud->arch](ud);
+
 	return CS_ERR_OK;
 }