LivenessScope

LivenessScope is a Groovy class that manages the reference counting of tables and other query resources that are created within it.

Syntax

Parameters

None.

Returns

An instance of a LivenessScope class.

Examples

The following example uses function-generated tables to produce a refreshing table that replaces its 5 rows every second. Encapsulating the function-generated table inside a liveness scope enables the safe deletion of data once the scope has been released. Calling scope.release() drops the scope's reference to the table and stops tableFromFunc from updating, unless the table is open in the UI, which keeps it updating until you close it.

Once tableFromFunc is no longer needed, call scope.release(). This drops the scope's reference to the table and stops tableFromFunc from updating.