| Index: base/android/scoped_java_ref.h
|
| diff --git a/base/android/scoped_java_ref.h b/base/android/scoped_java_ref.h
|
| index 8047ee8c16725ab0470acc1b71dfb77f5594e439..0defd6f15513461ec051f153a30411aba3b7de16 100644
|
| --- a/base/android/scoped_java_ref.h
|
| +++ b/base/android/scoped_java_ref.h
|
| @@ -154,7 +154,8 @@ class ScopedJavaLocalRef : public JavaRef<T> {
|
| }
|
|
|
| // Releases the local reference to the caller. The caller *must* delete the
|
| - // local reference when it is done with it.
|
| + // local reference when it is done with it. Note that calling a Java method
|
| + // is *not* a transfer of ownership and Release() should not be used.
|
| T Release() {
|
| return static_cast<T>(this->ReleaseInternal());
|
| }
|
| @@ -205,7 +206,8 @@ class ScopedJavaGlobalRef : public JavaRef<T> {
|
| }
|
|
|
| // Releases the global reference to the caller. The caller *must* delete the
|
| - // global reference when it is done with it.
|
| + // global reference when it is done with it. Note that calling a Java method
|
| + // is *not* a transfer of ownership and Release() should not be used.
|
| T Release() {
|
| return static_cast<T>(this->ReleaseInternal());
|
| }
|
|
|