Collect

Requests a .NET garbage collection.

This function is exported by the KS module.

Collect()

Remarks

Well-structured scripts rarely need this function. A collection does not finalize an object which is still reachable, and local variables can remain reachable until their function returns even after the script assigns another value to them.

Object Lifetime