Skip to content

Commit f54c5a7

Browse files
committed
edit Garbage collection
1 parent 579aa9c commit f54c5a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pages/4.2-Garbage-collection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Simply put, “reachable” values are those that are accessible or usable someh
1212

1313
1. There’s a base set of inherently reachable values, that cannot be deleted for obvious reasons.
1414

15-
For instance:
15+
For instance:
1616

1717
* Local variables and parameters of the current function.
1818

@@ -22,11 +22,11 @@ Simply put, “reachable” values are those that are accessible or usable someh
2222

2323
* (there are some other, internal ones as well)
2424

25-
These values are called roots.
25+
These values are called roots.
2626

2727
2. Any other value is considered reachable if it’s reachable from a root by a reference or by a chain of references.
2828

29-
For instance, if there’s an object in a local variable, and that object has a property referencing another object, that object is considered reachable. And those that it references are also reachable. Detailed examples to follow.
29+
For instance, if there’s an object in a local variable, and that object has a property referencing another object, that object is considered reachable. And those that it references are also reachable. Detailed examples to follow.
3030

3131
There’s a background process in the JavaScript engine that is called [garbage](https://en.wikipedia.org/wiki/Garbage_collection_(computer_science) "garbage") collector. It monitors all objects and removes those that have become unreachable.
3232

0 commit comments

Comments
 (0)