Terry Therneau-2 wrote > Another solution is the one used for a long time in the rpart code. > The R code called "rpart1", which does the work, keeps a static pointer to > the object, > does NOT > release it's memory, and returned the size of the object. > > Then the R code allocates appropriate vectors and called "rpart2", which > filled in the > result and > released the dynamic memory.
Yes, I thought of that solution. I discarded it though, as it seemed to me that it would increase processing time considerably. Does it still increase processing time when you have the static pointer pointed to the object to prevent its release? Terry Therneau-2 wrote > This was written before .Call was available. It works, but I agree with > Bill Dunlap that > you should use > .Call. > > Terry T. I guess I should start reading up on .Call. If there are other ideas, I will gladly hear them. Tee-Jay-Ardie -- View this message in context: http://r.789695.n4.nabble.com/Calling-an-array-in-a-struct-in-C-to-R-tp4669884p4669972.html Sent from the R devel mailing list archive at Nabble.com. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel