Hi Harshil,
Yes. A Map/Set structure should protect an object from being "Garbage Collected", unlike the WeakMap/Set structures. The same applies to a property of an object "{}". While the property is in use (is referenced), the whole object will still live in memory.
Great !! this is something new for me 😍
Question : Map and {} use strong reference right ??
Hi Harshil,
Yes. A Map/Set structure should protect an object from being "Garbage Collected", unlike the WeakMap/Set structures. The same applies to a property of an object "{}". While the property is in use (is referenced), the whole object will still live in memory.
Thanks bro 😊