Skip to content

Commit de22840

Browse files
committed
List possible fixes for potential GlobalRef leaks
1 parent 5198b95 commit de22840

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/global.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ use super::*;
2020
/// accessing interned symbols and Lisp functions, this is a non-issue, as the values are
2121
/// supposed to be "static" anyway.
2222
///
23+
/// The above is a shortcoming in the design of emacs-module. There are 2 possible ways to fix it:
24+
/// - Make [`free_global_ref`] work without an env, like Erlang's `enif_release_resource`.
25+
/// - Allow `user_ptr`'s finalizer to access the env, to properly free associated global refs.
26+
///
2327
/// [`Env`]: struct.Env.html
2428
/// [`Value`]: struct.Value.html
2529
/// [`defun`]: attr.defun.html

0 commit comments

Comments
 (0)