Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: talk/app/webrtc/java/jni/jni_helpers.cc

Issue 1308733004: Android: Fix memory leak for remote MediaStream (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: use helper NewGlobalRef function instead Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/java/jni/jni_helpers.h ('k') | talk/app/webrtc/java/jni/peerconnection_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/java/jni/jni_helpers.cc
diff --git a/talk/app/webrtc/java/jni/jni_helpers.cc b/talk/app/webrtc/java/jni/jni_helpers.cc
index a2cbd61971ecdcb68d4f5913a92ae4ea56223136..448d1ad91b0fe3a25362b78a851c839df5acc09e 100644
--- a/talk/app/webrtc/java/jni/jni_helpers.cc
+++ b/talk/app/webrtc/java/jni/jni_helpers.cc
@@ -273,17 +273,6 @@ void DeleteGlobalRef(JNIEnv* jni, jobject o) {
CHECK_EXCEPTION(jni) << "error during DeleteGlobalRef";
}
-WeakRef::WeakRef(JNIEnv* jni, jweak ref)
- : jni_(jni), obj_(jni_->NewLocalRef(ref)) {
- CHECK_EXCEPTION(jni) << "error during NewLocalRef";
-}
-WeakRef::~WeakRef() {
- if (obj_) {
- jni_->DeleteLocalRef(obj_);
- CHECK_EXCEPTION(jni_) << "error during DeleteLocalRef";
- }
-}
-
// Scope Java local references to the lifetime of this object. Use in all C++
// callbacks (i.e. entry points that don't originate in a Java callstack
// through a "native" method call).
« no previous file with comments | « talk/app/webrtc/java/jni/jni_helpers.h ('k') | talk/app/webrtc/java/jni/peerconnection_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698