GC
Module | ejs |
Definition | class GC |
Inheritance | GC Object |
Specified | ejscript-2.5 |
Stability | Evolving. |
Garbage collector control class.
Singleton class to control operation of the Ejscript garbage collector.
Properties
Qualifiers | Property | Type | Description |
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. |
Inherited Properties
GC Class Methods
Qualifiers | Method |
static | run(): Void |
| Run the garbage collector and reclaim memory allocated to objects and properties that are no longer reachable. |
Inherited Methods
GC Instance Methods
Qualifiers | Method |
(No own instance methods defined)
Inherited Methods
Method Detail
- Description
- 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.