Deno Runtime and V8 FinalizationRegistry: External Resource Cleanup Timing
Resource Management at the Runtime Boundary Deno manages memory via the V8 engine's garbage collector, but external resources—such as those handled through the internal Ops layer—require precise cleanup to avoid memory leaks in the native layer. While FinalizationRegistry is used to schedule the release of these external resources when the corresponding Java