InternalWhether this scope uses the lock-free perf root stack.
InternalWhether auto-tracking is currently enabled.
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.
InternalAttach an already-created root slot to a wrapper.
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
InternalRoot a raw Julia pointer in this scope before wrapping/type inspection.
InternalRelease a raw pointer root created by protectPointer().
Track a Julia value in this scope. When the scope is disposed, all tracked values will be released.
Note: Calling track() multiple times on the same value in the same scope is idempotent. Values owned by another active scope are rejected.
The Julia value to track
The same value (for chaining)
Check if the scope has been disposed.