2
$\begingroup$

First

r[t_] = {10 Cos[3/2 π t], 10 Sin[3/2 π t] + 3 Cos[6 t], 3 (1 - Cos[5/2 π t]) + 1};

Next, when I evaluate these lines, the memory reserved by mathematica.exe increases by 110 mb.

Graphics3D[{CapForm[None], Tube[FirstCase[ParametricPlot3D[r[t], {t, 0, 1}],
  Line[___], 0, {0, ∞}], 1/8]}, PlotRange -> {{-20, 20}, {-15, 15}, {0, 15}},
    Axes -> True, Boxed -> False, AxesOrigin -> {-20, -15, 0}]

Everytime something is changed in the plot I reevaluate the code, and then the previous plot is gone. However, the memory isn't freed, and eventually there is no more memory. Exit doesn't work because the memory is reserved by mathematica.exe. I also tried $HistoryLength = 0 which doesn't make a noteworthy difference.

How to free this memory without terminating mathematica.exe?

Edit: When leaving out CapForm[None] then MemoryInUse[$FrontEnd] is as good as constant. So this is a probably just a bug of CapForm.

$\endgroup$
2
  • 1
    $\begingroup$ Possible duplicate of How to un-eat memory? $\endgroup$
    – m_goldberg
    Jul 7, 2016 at 10:31
  • $\begingroup$ @m_goldberg I can't find an answer in there, everything seems to be about the kernel $\endgroup$
    – Coolwater
    Jul 7, 2016 at 10:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.