Merge "Fix bugs in ReleasePrimitiveArray."