Run fn inside a DisposalScope. The scope is disposed on all exit paths: Ok return, Err return, and throw. Use in any function that allocates kernel objects and returns Result.
return withScopeResult((scope) => { const axis = scope.register(makeKernelAx1(origin, dir)); return ok(castShape(getKernel().makeSomething(axis)) as Solid);}); Copy
return withScopeResult((scope) => { const axis = scope.register(makeKernelAx1(origin, dir)); return ok(castShape(getKernel().makeSomething(axis)) as Solid);});
Run fn inside a DisposalScope. The scope is disposed on all exit paths: Ok return, Err return, and throw. Use in any function that allocates kernel objects and returns Result.