-
Notifications
You must be signed in to change notification settings - Fork 148
Description
I understand the desire to give implementations advice on how to best manage memory for these objects, but I don't think that should translate into normative language. Especially as that normative language is what is already the case for the web platform.
If A holds a reference to B, that's a strong reference that cannot be collected. And if C now also holds a reference, B has two things pointing to it. And cannot be collected until either those references are cleared or A and C disappear.
I would therefore suggest:
-
Turning most of the reference counting section into a note, to the extent you consider it worth keeping.
-
Remove "A media resource MUST remain alive at least as long as it continues to be referenced by a [[resource reference]]." as that is already required.
-
Change language of the form
- Let resource be the media resource referenced by data’s [[resource reference]].
- Let reference be a new reference to resource.
- Assign reference to [[resource reference]].
to
- Set ???'s [[resource reference]] to data’s [[resource reference]].
(Currently it's not always clear what object the internal slot is from, that's the ??? above. I'd recommend spelling that out each time.)