Hey there, community,
I am having some issues with Mathematica's kernel seemingly leaking memory over time.
What I have tried so far is to start my notebook with the following commands:
Remove["Global`*"];
ClearSystemCache[];
$HistoryLength = 0;
MemoryInUse[]
However, when I run my notebook several times, MemoryInUse reports an increase of ~12 MB in memory consumption each time.
So, is there some generic solution that I'm missing here? If not, then I'll have to look into creating an example notebook, but I'll start with asking for a general solution.
If it helps, I'm working with NDSolve using the new FEM toolbox, so it's of course possible (though hopefully unlikely) that there's some memory issue with the FEM implementation.
-Jonatan
EDIT: I forgot to mention this, but simply killing the kernel isn't an option. In fact, I'd like to avoid even having to call Remove["Global`*"], since in this case the memory consumed by those variables is negligible -- Mathematica is using memory somewhere else, I just can't figure out where.