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

Unified Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java

Issue 2640433003: Android: AppRTCMobile: Don't leak CallActivity. (Closed)
Patch Set: Created 3 years, 11 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 | « webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
index 9f7a47ef83e50e223182ab97ec7ed34eb8c46e09..cbc69e9451f1265d88a5b58b2df1a49492cda2f4 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
@@ -92,7 +92,6 @@ public class PeerConnectionClient {
private final SDPObserver sdpObserver = new SDPObserver();
private final ScheduledExecutorService executor;
- private Context context;
private PeerConnectionFactory factory;
private PeerConnection peerConnection;
PeerConnectionFactory.Options options = null;
@@ -292,7 +291,6 @@ public class PeerConnectionClient {
videoCallEnabled = peerConnectionParameters.videoCallEnabled;
dataChannelEnabled = peerConnectionParameters.dataChannelParameters != null;
// Reset variables to initial states.
- this.context = null;
factory = null;
peerConnection = null;
preferIsac = false;
@@ -459,7 +457,6 @@ public class PeerConnectionClient {
if (options != null) {
Log.d(TAG, "Factory networkIgnoreMask option: " + options.networkIgnoreMask);
}
- this.context = context;
factory = new PeerConnectionFactory(options);
Log.d(TAG, "Peer connection factory created.");
}
@@ -639,6 +636,8 @@ public class PeerConnectionClient {
videoSource.dispose();
videoSource = null;
}
+ localRender = null;
+ remoteRenders = null;
Log.d(TAG, "Closing peer connection factory.");
if (factory != null) {
factory.dispose();
@@ -649,6 +648,7 @@ public class PeerConnectionClient {
events.onPeerConnectionClosed();
PeerConnectionFactory.stopInternalTracingCapture();
PeerConnectionFactory.shutdownInternalTracer();
+ events = null;
}
public boolean isHDVideo() {
« no previous file with comments | « webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698