kaskr / adcomp

AD computation with Template Model Builder (TMB)
Other
176 stars 80 forks source link

Thread gc #330

Closed kaskr closed 3 years ago

kaskr commented 3 years ago

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: