Skip to content
Prev 4521 / 21312 Next

[Bioc-devel] IntAE buffers needs to be freed or not??

Hi Ge,

No you don't. At least not currently, because those buffers use
transient memory which will be freed automatically when .Call()
returns. However, I might change the implementation of the IntAE
buffers to use user-controlled memory at some point (malloc() is
so much faster than R_alloc(), about 10x-20x for me), so when this
happens you will need to do something like

   .Call("AEbufs_free", PACKAGE="IRanges")

unless you call your .Call entry point with .Call2 (defined in the
IRanges package), which will take care of doing that for you. I highly
recommend you do that if you use the IntAE buffers in your C code or
if you call C functions that use the IntAE buffers (and a lot of C
functions in IRanges and Biostrings use them).

Cheers,
H.
On 07/19/2013 03:35 AM, Ge Tan wrote: