- From: <bugzilla@jessica.w3.org>
- Date: Thu, 15 May 2014 10:21:29 +0000
- To: public-webrtc@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25724
Bug ID: 25724
Summary: Allow garbage collection of closed PeerConnections
Product: WebRTC Working Group
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: WebRTC API
Assignee: public-webrtc@w3.org
Reporter: harald@alvestrand.no
CC: public-webrtc@w3.org
At the moment, the webrtc specification says:
4.3.3 Garbage collection
A Window object has a strong reference to any RTCPeerConnection objects created
from the constructor whose global object is that Window object.
In other words, RTCPeerConnections can't be garbage collected.
In certain applications, where a lot of connections are created, used and
closed, this is a Bad Thing, since you can't get rid of old, closed
PeerConnections, and you can't reuse them either (there's no return from the
"closed" state).
Proposal 1: Replace the text with:
A Window object has a strong reference to any RTCPeerConnection objects created
from the constructor whose global object is that Window object, and whose
RTCSignalingState is not "closed".
Proposal 2 (less artificial):
An RTCPeerConnection is considered to have a strong reference to it from the
Window object that was the global object of the constructor as long as any
event can cause a handler to be triggered on the object. When the
RTCSignalingState is "closed", no such handler can be triggered.
In either proposal, it might be good to add:
All RTCDTMFSender objects, RTCDataChannel objects and MediaStreamTrack objects
that are connected to a PeerConnection are considered to have a strong
reference to the PeerConnection object.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
Received on Thursday, 15 May 2014 10:21:30 UTC