File: gc.md

package info (click to toggle)
surgescript 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,200 kB
  • sloc: ansic: 15,748; sh: 61; javascript: 38; makefile: 13
file content (30 lines) | stat: -rw-r--r-- 735 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
GC
==

SurgeScript features a Garbage Collector (GC) that automatically disposes objects that cannot be reached from the root (i.e., their references are lost). The Garbage Collector is available at `System.gc`. Generally, you do not need to modify any of its settings.

Properties
----------

#### interval

`interval`: number, read-only.

Every `interval` seconds, the garbage collector will be called automatically.

*Note:* this property is read-only since SurgeScript 0.6.0.

#### objectCount

`objectCount`: number, read-only.

How many objects were disposed when the garbage collector was last called.

Functions
---------

#### collect

`collect()`

Calls the Garbage Collector manually. You generally don't need to call this.