New class ScopedJavaRefCounted

Intended to be used for holding on to references to the java
EncodedImage and call its release method when no longer used by C++.

Bug: webrtc:9378
Change-Id: I40d917c2bb4217419ef2d609e517566c8466a274
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/154740
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29347}
This commit is contained in:
Niels Möller
2019-09-27 14:04:56 +02:00
committed by Commit Bot
parent e00ea5ef11
commit ef3dbad49a
3 changed files with 57 additions and 1 deletions

View File

@ -24,5 +24,5 @@ public interface RefCounted {
* Decreases ref count by one. When the ref count reaches zero, resources related to the object
* will be freed.
*/
void release();
@CalledByNative void release();
}