-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Description
Resources that are exported by components should have their disposal functions ([Symbol.dispose]()
in JS) called when they are removed from the embedder's scope.
It's unclear if it's simply jco embedders (i.e. transpiled components) that are failing to do this, but a simple use (see #988 ) does not print the disposal message as expected.
Let's ensure that transpiled code properly disposes of resources that are in components. To illustrate, the following code:
{
using ex1 = new resources.Example();
console.log('Hello from ex1:', ex1.hello('ex1'));
}
Should trigger the [Symbol.dispose]()
on the Example
resource inside the component.