I'm reading this article on web workers and I came across this section on Transferable Objects:
With Transferable Objects, data is transferred from one context to another. It is zero-copy, which vastly improves the performance of sending data to a Worker. Think of it as pass-by-reference if you're from the C/C++ world. However, unlike pass-by-reference, the 'version' from the calling context is no longer available once transferred to the new context.
Why? Based on my understanding of Abstract Stack Machines, it seems perfectly reasonable that original pointer can be left in tact. Admittedly, since the data is now referenced from another context, it would be a tricky task to continue working with it, but not totally unreasonable. Why is the original object cleared?
I'd also like to learn how this whole process takes place under the hood, if anyone has some valuable insight there.