fix typo "colector" => "collector"
Fix typo in line 287
This commit is contained in:
parent
e1a3f634a4
commit
7ffb6ce9bb
1 changed files with 1 additions and 1 deletions
|
@ -284,7 +284,7 @@ The most notable limitation of `WeakMap` and `WeakSet` is the absence of iterati
|
|||
|
||||
`WeakSet` is `Set`-like collection that stores only objects and removes them once they become inaccessible by other means.
|
||||
|
||||
It's main advantages are that they have weak reference to objects, so they can easily be removed by garbage colector.
|
||||
It's main advantages are that they have weak reference to objects, so they can easily be removed by garbage collector.
|
||||
That comes at the cost of not having support for `clear`, `size`, `keys`, `values` ...
|
||||
|
||||
`WeakMap` and `WeakSet` are used as "secondary" data structures in addition to the "primary" object storage. Once the object is removed from the primary storage, if it is only found as the key of `WeakMap` or in a `WeakSet`, it will be cleaned up automatically.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue