Many thanks Bill and Dirk.

I'm now explicitly casting each element and this works fine. I was just
surprised that this inappropriate use of wrap would cause a memory leak on
certain OS's and run without problems on others.

Best wishes,

Rajen

On 11 August 2016 at 10:18, Dirk Eddelbuettel <e...@debian.org> wrote:

>
> To follow-up, if we avoid the cast this works just find as you'd expect:
>
> R> cppFunction("NumericVector myrunif() { return floor(runif(1000000)); }")
> R> for (i in 1:100) ignoreme <- myrunif()
> R>
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to