|Definition|| class GC|
Garbage collector control class.
Singleton class to control operation of the Ejscript garbage collector.
| static get set ||enabled||Boolean||Is the garbage collector is enabled. Enabled by default.|
| static get set ||newQuota||Number||The 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 Class Methods
| static ||run(): Void|
| ||Run the garbage collector and reclaim memory allocated to objects and properties that are no longer reachable.|
GC Instance Methods
(No own instance methods defined)
- Run the garbage collector and reclaim memory allocated to objects and properties that are no longer reachable. When objects and properties are freed, any registered native destructors will be called. The run function will
run the garbage collector even if the enable property is set to false.
It is normally not required to manually call the run method as the ejs virtual machine runtime will
automatically run the garbage collector as required.