Open stanstrup opened 9 years ago
Hi, the high memory requirements are already present without the addMolecules() call:
echo 'library (Rdisop) ; elements=c( initializePSE(),initializeCharges()) ; for (i in 1:100000){ getMolecule("H38N32O15P8",elements=elements)$formula } ' | R --vanilla
Not sure where to fix that.
Hi Stan, as Steffen already pointed out also get-functions are effected. My hypothesis is that in connection with C-code GarbageCollection doesn't work. Until it is fixed you can either substitute by your own function or use the equivalent functions from the enviPat package. But careful, enviPat requires explicit C1H4 instead of CH4, so you have to use enviPat::check_chemform before processing Rdisop output.
It looks like there is a memory leak in addMolecules/subMolecules. If you do:
Several hundred MB are consumed that are never released again (gc() doesn't help). Even if saving the output only takes 500 Kb.