Get a scoped proxy for the Julia static class. All Julia objects created through this proxy are automatically tracked.
Get the number of tracked objects in this scope. Note: With scope-based tracking, this returns the number explicitly tracked.
Dispose the scope and release all tracked Julia objects.
Remove a value from tracking (escape from scope). The value will survive scope disposal.
Implementation: Transfer the value to global scope (id=0) which is never auto-released.
Note: In perf mode, escape() re-pushes the value to the default GC stack with FinalizationRegistry cleanup. The original perf stack slot is still released.
The Julia value to escape
The same value
Track a Julia value in this scope. When the scope is disposed, all tracked values will be released.
Note: This pushes the value to the GC stack. Calling track() multiple times on the same value will push it multiple times. This is intentional for performance - the model doesn't do deduplication.
The Julia value to track
The same value (for chaining)
Check if the scope has been disposed.