Re: [Rcpp-devel] Interfacing Rcpp with a C library: memory allocation

2013-11-21 Thread Dirk Eddelbuettel
On 21 November 2013 at 14:37, Alessandro Mammana wrote: | I found out what the problem was, luckily it was just a stupid bug in | my code (an array index out of bounds). | I still didn't quite get how memory allocation works. As far as I | understood there are these two ways of allocating memory:

Re: [Rcpp-devel] Interfacing Rcpp with a C library: memory allocation

2013-11-21 Thread Alessandro Mammana
I found out what the problem was, luckily it was just a stupid bug in my code (an array index out of bounds). I still didn't quite get how memory allocation works. As far as I understood there are these two ways of allocating memory: 1. Using malloc/free, new/delete, normal C++ constructors and de