You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have a strong reference to the data. So, if the data references one of the keys, it will never be released.
The implementation in wasm_of_ocaml uses a chain of WeakMaps: to access the data, we iteratively perform a lookup using each key in turn.
The implementation is also probably racy. It uses a FinalizationRegistry which is asynchronous. So, a newly set data might get deleted if the previous data was considered as garbage. This is probably no longer an issue since ephemerons are immutable since OCaml 5.0.0.
The text was updated successfully, but these errors were encountered:
Currently, we have a strong reference to the data. So, if the data references one of the keys, it will never be released.
The implementation in wasm_of_ocaml uses a chain of WeakMaps: to access the data, we iteratively perform a lookup using each key in turn.
The implementation is also probably racy. It uses a FinalizationRegistry which is asynchronous. So, a newly set data might get deleted if the previous data was considered as garbage. This is probably no longer an issue since ephemerons are immutable since OCaml 5.0.0.
The text was updated successfully, but these errors were encountered: