Merge change 873 into donut

* changes:
  pass original ptrs to JNI release functions (instead of += index to them)