[Date Index] [Thread Index] [Author Index]
Re: Strong memory consumption by List-plotting functions
On Aug 4, 11:25 am, markus <markusg.phys at googlemail.com> wrote: > Hi again, > > it seems that functions like ListVectorPlot3D, ListContourPlot3D, and > similar ones, have a kind of memory leakage: each time one of these > functions is executed, the memory usage increases (as indicated by the > SystemMonitor). That is, after calling these functions, say 20 times, > with some larger dataset, all my RAM is used up and I have to restart > Mathematica. Using constructs like > g = ListVectorPlot[...] > ... > Clear[g] > also don't help. > A likely reason for this problem is that Mathematica remembers all the outputs. You can access the last output with %, the output before that with %%, etc. Or access the first output with Out, the second with Out, etc. So when you do g = ListVectorPlot[...]; Clear[g], the graphics output will still be remembered in the Out variable. To limit the number of outputs that Mathematica will remember, you can use $HistoryLength. Try $HistoryLength = 0, or $HistoryLength = 1 to remember only the last output. I regularly use these when creating very large graphics.