Re: [webrtc-stats] Is keeping stats around a memory problem?

A dead stats object is not large (a few hundred bytes? a kbyte?)
Without "objectDeleted" stats objects, I don't see a way to satisfy the other requirements we have - to account accurately for resources used by objects using a polling interface.

There are other ways we could do this (for instance adding an event handler to the PeerConnection that has a stats object fired at it whenever a component object gets detached). I'm not sure if that would be a cleaner design.

(We could even retrofit the old behavior onto such an API by having a default handler that added the stats object, with an objectDeleted marker, to an internal slot called "[[rememberAndReturnTheseStatsObjectsWhenAsked]]" or something like that. But I may be letting my imagination run away with me.)


-- 
GitHub Notification of comment by alvestrand
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/235#issuecomment-346609835 using your GitHub account

Received on Thursday, 23 November 2017 12:48:19 UTC