You can read a comprehensive article I wrote for the JavaScript tutorial: WeakRef and FinalizationRegistry. Where the use of weak references is described in detail.