Ah! Works like a charm.
In reply to Re^6: Memory management with long running scripts by AnomalousMonk in thread Memory management with long running scripts by jamesrleu