Index: webrtc/sdk/objc/Framework/UnitTests/RTCPeerConnectionTest.mm |
diff --git a/webrtc/sdk/objc/Framework/UnitTests/RTCPeerConnectionTest.mm b/webrtc/sdk/objc/Framework/UnitTests/RTCPeerConnectionTest.mm |
index bd2db305da7daf15cc727583a51f22f2d576bb4f..1797feabce077143a3a7615e8da534c3f2bedc24 100644 |
--- a/webrtc/sdk/objc/Framework/UnitTests/RTCPeerConnectionTest.mm |
+++ b/webrtc/sdk/objc/Framework/UnitTests/RTCPeerConnectionTest.mm |
@@ -53,11 +53,13 @@ |
RTCMediaConstraints *contraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:@{} |
optionalConstraints:nil]; |
RTCPeerConnectionFactory *factory = [[RTCPeerConnectionFactory alloc] init]; |
- RTCPeerConnection *peerConnection = [factory peerConnectionWithConfiguration:config |
- constraints:contraints delegate:nil]; |
- |
- RTCConfiguration *newConfig = peerConnection.configuration; |
+ RTCConfiguration *newConfig; |
+ @autoreleasepool { |
+ RTCPeerConnection *peerConnection = |
+ [factory peerConnectionWithConfiguration:config constraints:contraints delegate:nil]; |
+ newConfig = peerConnection.configuration; |
+ } |
EXPECT_EQ([config.iceServers count], [newConfig.iceServers count]); |
RTCIceServer *newServer = newConfig.iceServers[0]; |
RTCIceServer *origServer = config.iceServers[0]; |