mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
fix(bindings): add SafeHandleWrapper + memory growth checks; bump 0.9.1 (#571)
- Introduce SafeHandleWrapper with gating, short drain wait, and deferred release on last in-flight exit. - Wire Engine/Program/Rvm/CompiledPolicy to wrapper (centralized handle use, interop helper). - Add C# memory growth tests (using/finalizer paths) and extend xtask C# runner options. - Add pooled marshalling utilities, ResultHelpers, and API cleanups; update versions/changelog. Fixes #570. Closes #554 Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
455d2aa588
commit
96360fa9d8
@@ -89,12 +89,14 @@ namespace Regorus
|
||||
);
|
||||
}
|
||||
|
||||
if (result.int_value < 0)
|
||||
try
|
||||
{
|
||||
throw new OverflowException($"{errorContext}: native value was negative ({result.int_value})");
|
||||
return checked((ulong)result.int_value);
|
||||
}
|
||||
catch (OverflowException ex)
|
||||
{
|
||||
throw new OverflowException($"{errorContext}: native value was out of range ({result.int_value})", ex);
|
||||
}
|
||||
|
||||
return (ulong)result.int_value;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user