Stop Leaking Memory with WeakMap

Fixing weak code with weak references!