Issue:
When running a script you repeatedly receive a MAXScript Garbage Collection error.
Solution:
Open the “Preferences” dialog and change a value for “Initial heap allocation” to 256 or 512.
Restart the 3Ds Max.
See another solution here:
3ds max Maxscript Heap Memory Allocation