[Closed] Common causes of memory leaks?
I’m working on a rather complex script right now that both clones and creates a lot of geometry and keyframes.
At the moment, there’s just too much in the script to get into the details, and I’m not sure where I’d even start, so my question is just this:
What are the most common causes of memory leaks? Despite the scale and complexity of the script, I’m not doing anything particularly weird or exotic, and yet I find myself having to restart max every 10-20 times I run it. Max gets progressively slower and more unstable until I finally have to dump it entirely, so it really sounds like typical memory leak behavior.
Since it’d take forever to explain everything I’m doing, I’d rather just get some general memory leak insight and try to apply it to my script myself. This is REALLY driving me nuts though, and I’m on a tight deadline, so any help would be great.
Thanks!
You could try using the garbage collection function: gc light:true
light:true does not clear the undo buffer.
well, for starters, the most basic type of memory leak I found was if you simply use a loop to open a file, and reset max, and gc !!
(I was opening the same file, not even different ones.
The leak was huge in Max 8, lesser in Max9, haven’t tested with newer versions.)
DirectX materials seem to be leaky