3
votes
0answers
121 views

Module in numerical model for NonlinearModelFit is slow and leaks memory

I am trying to make a NonlinearModelFit where the model is the result of a numerical calculation. My code works, but it is very slow and also seems to have a memory ...
14
votes
2answers
230 views

Module trash collection behaviour

I have asked this question before on the Wolfram community forum (http://community.wolfram.com/groups/-/m/t/83845?p_p_auth=Gxoxe65B) but not with great success. Module creates temporary variables of ...
1
vote
1answer
178 views

Using block or module to free cache

I'm writing some code at the moment that schematically looks like: (set initial conditions for some differential equation for given parameters (M,R,...)) ...