So…
I first tried tracking down the size of the variables on each time round the trial loop as follows:
all_variables = dir()
for currentVariable in all_variables:
print currentVariable
print(sys.getsizeof(currentVariable))
All of the variables stayed the same size throughout, whilst the memory usage still ramped up…
Now attempting to find a suitable memory profiler…
I’ve decided I’ll have a go with objgraph (although if anyone has better recommendations then let me know) - https://mg.pov.lt/objgraph/
I downloaded objgraph using pip on the main terminal (following this: https://www.youtube.com/watch?v=yBdZZGPpYxg )
objgraph now works in IDLE, but if I call it in PsychoPy it doesn’t. Sorry if this is a stupid question, but how do I get it to work in PsychoPy?
Thanks!