Using the field isn’t the issue, using a variable has the same effect (except that now the issue is that you are not passing a reference to the variable). See Properly using `finalizer`, `ccall`, `cconvert` and `unsafe_convert` - #10 by yuyichao and Properly using `finalizer`, `ccall`, `cconvert` and `unsafe_convert` - #13 by yuyichao . I prefer not to repeat that whole thing again but let me know which part is unclear in that explaination…
1 Like