add some more comments regarding invalidating @handle of cs_close()
diff --git a/cs.c b/cs.c
index cf60bee..f36a120 100644
--- a/cs.c
+++ b/cs.c
@@ -194,7 +194,8 @@
memset(ud, 0, sizeof(*ud));
cs_mem_free(ud);
- // invalid this handle
+ // invalidate this handle by ZERO out its value.
+ // this is to make sure it is unusable after cs_close()
*handle = 0;
return CS_ERR_OK;
diff --git a/include/capstone.h b/include/capstone.h
index ce6abdb..c926e4f 100644
--- a/include/capstone.h
+++ b/include/capstone.h
@@ -232,6 +232,8 @@
cached memory, thus access to any Capstone API after cs_close() might crash
your application.
+ In fact,this API invalidate @handle by ZERO out its value (i.e *handle = 0).
+
@handle: pointer to a handle returned by cs_open()
@return CS_ERR_OK on success, or other value on failure (refer to cs_err enum