The Module function in Module.R is mysterious because it is not clear from<br>the code itself or from the docs that the second argument can be a DLLInfo,<br>yet that is what appears in your example. Also, this function is re-entered<br>
for the same object, with different logic each time. When the module<br>parameter is a string only an S4 class template is returned. Then later<br>it is called again (with this S4 template) and the C++ classes are filled<br>
in. Finally, it appears that showClass(unif_module) causes Module()<br>to be called again, with the side-effect of recontructing the class. But<br>showClass(unif_module) should just be a query??? The same thing<br>happens with show(unif_module).<br>
<br>Generally speaking, how can we be sure that poking variables into R&#39;s address<br>space from the C++ side will not cause aliasing problems due to R&#39;s<br>attempt to limit the amount of copying, which can lead to memory issues<br>
like the ones you have reported?<br><br>Dominick<br><br><div class="gmail_quote">On Thu, Jan 6, 2011 at 5:17 PM, Douglas Bates <span dir="ltr">&lt;<a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I finally managed to get an example from the Rcpp documentation to fail for me.<br>
<br>_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
<br></blockquote></div><br>