Thanks for all replies. I think the idea of a callback and link to RcppXPtrUtils is pointing me in the right direction. Michael Meyer [[alternative HTML version deleted]]