PL_open_foreign_frame we can open new frames from inside a predicate written in c. There’s also a
PL_close_foreign_frame(fid), which I assumed has to be called to match any corresponding frame opens.
However, I just noticed that I am actually not closing my foreign frames properly in some places. As far as I can tell though, nothing has blown up.
Is it actually necessary to close foreign frames? Or can I rely on this cleanup happening anyway when reaching the end of a foreign predicate?