In SciDBR if I issue a statement like
A = scidbeval(B, temp=TRUE)
Then the array backing A will be cleaned up by the garbage collector whenever A goes out of scope. temp=TRUE means that A will be backed by a 'temp' array but if there are too many temp arrays to fit in memory, SciDB will spill least recently used chunks to disk.
You can also disable this behavior with:
A = scidbeval(B, temp=TRUE, gc=0, name="myArray")
The name argument is not a requirement but a nice-to-have so that you don't lose track of the object.
There are some cases where the R session may quit unexpectedly and that may leak a temp array. Those arrays are easily found by name and can be cleaned up later.
Hope it helps.