Merge pull request #2231 from Dewke/dewke-minor-fix
Minor clarification on WeakMap and WeakSet
This commit is contained in:
commit
ca17a69ad9
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,8 @@ let array = [ john ];
|
||||||
john = null; // overwrite the reference
|
john = null; // overwrite the reference
|
||||||
|
|
||||||
*!*
|
*!*
|
||||||
// john is stored inside the array, so it won't be garbage-collected
|
// the object previously referenced by john is stored inside the array
|
||||||
|
// therefore it won't be garbage-collected
|
||||||
// we can get it as array[0]
|
// we can get it as array[0]
|
||||||
*/!*
|
*/!*
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue