Open
Description
An earlier issue suggested the implementation of a @destructor
annotation, but it turned out that is is likely not feasible and we should instead aim for a more JS-like approach, i.e. along the lines of WeakRef and FinalizationRegistry since that's much safer. Also, since __finalize
has been implemented recently, it should be possible now to roll custom solutions, or to investigate a JS-like approach further.