The RunSpace and its closure
问题 While working with a script that uses a RunSpace, I found that it takes up more and more system memory. As far as I understand, this is due to the fact that open RunSpace do not close when completed. They remain in memory, accumulating megabytes. How to close the RunSpace, correctly? However, I do not know how long it will take - 1 second or 1 hour. Closes itself when completed. As an example, I will give arbitrary scripts. The first script is how I do the closing of the RunSpace as it is