cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
zephyrfei
Level I

How to release memory in loop script

I created a loop script for a very big dataset. When looping, for all the temporary data table, I use close(dt, No Save), seems it can release the memory. However, in one of the data table, I keep adding a temporary column, did some post process, then delete that column. After I finish running the loop, 5G of my HDD is gone. Is there any way I can release the memory after I delete the temporary column? Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
mzwald
Staff

Re: How to release memory in loop script

I doubt this is possible as it would break the Undo functionality to undo deleting a column.
A workaround would be to save the data table in the loop after deleting temp column, close the table, and then reopen it to create the next temp column.  This would cause JMP to release the memory every time the table is closed.

View solution in original post

4 REPLIES 4
mzwald
Staff

Re: How to release memory in loop script

I doubt this is possible as it would break the Undo functionality to undo deleting a column.
A workaround would be to save the data table in the loop after deleting temp column, close the table, and then reopen it to create the next temp column.  This would cause JMP to release the memory every time the table is closed.

zephyrfei
Level I

Re: How to release memory in loop script

Never thought of that. Thank you for the suggestion! 

pmroz
Super User

Re: How to release memory in loop script

What if you use a matrix instead of a temporary column?  I think you can release memory simply by setting the matrix variable = .

mikedriscoll
Level VI

Re: How to release memory in loop script

Good point. You could also use the same column instead of deleting it, particularly if it was a character column. Just clear the contents by assigning a '.' or a "" for numeric or character respectively.