I've run a plan to create a large set of objects in drake's cache. Now, outside of a plan, I ran lapply
over a subset of those objects so I can summarize some of their properties and plan my next steps.
I'm using readd
to load each one of these cached objects inside of the function I'm applying over, but they seem to still use up RAM after I'm done with them. That's a problem in my scenario because it's 100 GiB of RAM by the time it's finished. I'm not sure where in the environment I should be looking for them if I need to explicitly remove them.
I understand that drake is doing something similar to memoization with the cache, since if I readd
the same object twice, the first one takes time to read from disk, and the second time is instantaneous. But in this scenario, I'd like to treat the cache as a simple data source like any other file, so that an object doesn't take up RAM if it's rm()
'd or goes outside of the scope.