title: Performance and Memory usage when Using std::string in Java JNI Programming
body: <pre><code>const char* chr = env-&gt;GetStringUTFChars(myjstring, NULL);
  std::string cstr(chr);
  env-&gt;ReleaseStringUTFChars(myjstring, chr);
  </code></pre>
  
  <p>The same copy of a <strong>string data</strong> in the above code is<br>
  myjstring (copy 1)<br>
  chr (copy 2)<br>
  cstr (copy 3)    // string manipulation will be easy.</p>
  
  <p>So to avoid one copy of string data, when writing Java JNI programming, will it be a best practice if one avoid using std::string in the above scenario and go with char*?. </p>