R The garbage collector does not automatically call C freeunless you report it.
For example, if you have a C function, let it call a “allocator”, which returns a pointer with the appropriate memory:
varA <- .Call("allocator", 1000)
doProcess(varA)
varA <- .Call("allocator", 1000)
, "" . :
varA <- .Call("allocator", 1000)
reg.finalizer(varA, function(x){
.Call("deAllocator", x)
})
doProcess(varA)
varA <- .Call("allocator", 1000)
"deAllocator" C, .