WeakSet
A collection of objects held weakly, used to mark objects, such as elements already processed, without keeping them alive.
In more detail
Its members must be objects or non-registered symbols. Like WeakMap it cannot be iterated.
Related terms
- WeakMap — A key-value collection whose keys must be objects and are held weakly, so an entry disappears when its key object is garbage collected.
- Set object — A built-in JavaScript collection of unique values.
Taught in
- Memory Management: Garbage Collection, Memory Leaks And WeakMap — Frontend Architecture & Web Platform