Re: [mediacapture-region] Should we support strings in addition or in lieu of opaque identifiers? (#46)

> > The interesting case is when the element is still present, not when it went away.
> 
> What's interesting about that case?

If element went away, you can clear the mapping between CropTarget/uuid and the element. No different between CropTarget and UUID.
If the element is there, you can clear the mapping if CropTarget is GCed. You cannot clear the mapping if UUID is GCed.

> Recreating the UUID is equivalent to never letting go of the CropTarget.

Exactly, and that is not great. We like to free memory as soon as we can.
We cannot do this with UUIDs. Please look at what blob URLs are as a precedent.

> If the Element is GCed, the CropTarget becomes meaningless. (And btw - that's another way GC can be observed here, regardless of whether we go with a UUID or a CropTarget.)

No. Before being GCed, the element will be detached from the DOM. At that point, cropping/cropTo should give us the same result, whether the element is GCed or not.

-- 
GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/46#issuecomment-1134907013 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 23 May 2022 16:47:05 UTC