Re: Improvements suggestion for DataChannels

On 3 March 2014 03:01, Adam Bergkvist <adam.bergkvist@ericsson.com> wrote:
> I still think we should avoid having a list of DataChannels on the
> PeerConnection object since we don't have a counterpart for
> PeerConnection.removeStream() for DataChannels. This means that, to make it
> possible to ever garbage collect DataChannel objects, DataChannel.close()
> would need to have a side effect that removed the channel from its
> PeerConnection or we would have to add a new method to do that. Both are
> strange an unmotivated IMO.


I'm not sure that that is true.  If the getter is never called, then
the channel can be GCd.  If it is called, then close is going to make
it unusable, but the object reference can persist as long as the
reference is held.

The object itself doesn't really hold any state.  I don't see this as
a big issue.

Received on Monday, 3 March 2014 11:07:01 UTC