Interface IRuntimeSession
The root of an execution session. A single session holds the statically-defined symbols and, depending on the host mode, serves as the run-time or break (debug) session — it is independent of the host's current mode.
public interface IRuntimeSession
Remarks
⚖️RDCore provides an implementation of this interface licensed under GPLv3.
Properties
CallStack
The session's call stack — pushing and popping an ICallStackFrame per procedure activation is what makes a procedure's locals and parameters visible through ISessionSymbols's Resolver (RD-VBAL §2.3.1.2's local stack frame heap tier).
ICallStack CallStack { get; }
Property Value
Environment
The host environment this session runs in — bitness (Environment.Is64Bit drives
LongPtr width and #If Win64 / #If VBA7), locale, code page, …
IRuntimeEnvironmentProfile Environment { get; }
Property Value
Memory
The session's memory allocator — tracks allocation size and fragmentation, MSVBVM-style.
ISessionMemoryAllocator Memory { get; }
Property Value
Objects
The session's object lifetime manager.
ISessionObjects Objects { get; }
Property Value
References
The workspace's references in declaration order (RD-VBAL §2.3.1.2): index
0 appears first and is the lowest precedence (the VBA standard library), so a
later entry shadows it on a global-scope name collision. This is the precedence order only —
a reference's members are resolved through ISymbolResolver, not from here. Preserved
exactly as the language server provides it; empty when the session was composed without a
project (e.g. a bare REPL).
IReadOnlyList<ReferencePriorityInfo> References { get; }
Property Value
Symbols
The session's symbol table.
ISessionSymbols Symbols { get; }
Property Value
Methods
ReleaseReference(VBRuntimeObjectId, IBindingHandle)
Drops handle's reference to instance and, if that was its
last remaining reference, destroys the object: frees the storage its live instance allocated
(DestroyInstance(VBRuntimeObjectId)) and forgets it (TryRemoveObject(VBRuntimeObjectId)).
bool ReleaseReference(VBRuntimeObjectId instance, IBindingHandle handle)
Parameters
instanceVBRuntimeObjectIdhandleIBindingHandle
Returns
- bool
trueif the object was destroyed as a result of this call.
Remarks
This is the only correct way to drop a reference — calling RemoveRef(VBRuntimeObjectId, IBindingHandle) directly leaves the instance's field storage allocated forever once the count reaches zero, since nothing else would go on to call DestroyInstance(VBRuntimeObjectId) for it.