It used to be that one could call read-only R-API functions such as REAL() in multithreading mode. With recent versions of R this is no longer the case, as it will mess up the garbage collector. This was demonstrated in #316 by 'Example 2'. The present PR solves these problems:
Should solve #316 completely (in particular 'Example 2' now works without using FreeADFun).
Should also solve problems reported here by @boennecd
Fix issues with gc() in multithread mode
It used to be that one could call read-only R-API functions such as
REAL()
in multithreading mode. With recent versions of R this is no longer the case, as it will mess up the garbage collector. This was demonstrated in #316 by 'Example 2'. The present PR solves these problems:FreeADFun
).