memory allocating /deallocating in jni
1. the jni code looks like this:
char * x = malloc(10);
jstring y = env->newStringUTF(x);
//free(x)?
return y;
//back to java
should I use free(x) after i have created jstring from it?
or does java pin out the memory of x to y (not copying it) so freeing it will cause damage to jstring object y.
2.good jni book

