This PR adds `Runtime.hold`, which ensures its argument remains alive until the callsite by holding a reference to it. This can be useful for unsafe code (such as an FFI) that relies on a Lean object not being freed until after some point in the program. It is implemented via a `static inline` function in `lean.h` so that C will optimize away the call. --------- Co-authored-by: Henrik Böving <hargonix@gmail.com> |
||
|---|---|---|
| .. | ||
| FilePath.lean | ||
| IO.lean | ||
| IOError.lean | ||
| Platform.lean | ||
| Promise.lean | ||
| ST.lean | ||
| Uri.lean | ||