What is WeakMap
That is, an object’s presence as a key in a
WeakMap does not prevent the object from being garbage collected. Once an object used as a key has been collected, its corresponding values in any
WeakMap become candidates for garbage collection as well — as long as they aren’t strongly referred to elsewhere.