GC

Moduleejs.sys
Definition class GC
InheritanceGC inherit Object
Specifiedejscript-1.1
StabilityEvolving.

Garbage collector control class.

Singleton class to control operation of the Ejscript garbage collector.


Properties

QualifiersPropertyTypeDescription
public static get setenabledBooleanIs the garbage collector is enabled. Enabled by default.
public static get setworkQuotaNumberThe quota of work to perform before the GC will be invoked. Set to the number of work units that will trigger the GC to run. This roughly corresponds to the number of allocated objects.

GC Methods

QualifiersMethod
public static run(deep: Boolean = false): Void
 Run the garbage collector and reclaim memory allocated to objects and properties that are no longer reachable.

Method Detail

static public run(deep: Boolean = false): Void

Run the garbage collector and reclaim memory allocated to objects and properties that are no longer reachable.

Description
When objects and properties are freed, any registered destructors will be called. The run function will run the garbage collector even if the enable property is set to false.
Parameters
deep: Boolean If set to true, will collect from all generations. The default is to collect only the youngest geneartion of objects. [default: false]