Modified functions to return pointers where appropriate
GetStringChars will return a pointer to the underlying char array iff it is not movable. Otherwise, it will return a copy of the char array. For consistency, the null terminating character has been removed as the specification for a jchar strings are not null terminated: http://developer.android.com/training/articles/perf-jni.html GetStringCritical will now always return a pointer to the char array. The char array is pinned and moving gc is disabled until the pointer is released. Change-Id: I19c8cbaecc1f3f723d80acec074fb8c5e2d489c3
Loading
Please sign in to comment