You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if a comparison to registered symbols would be helpful in deciding on the correct behavior would be helpful here.
If I recall correctly, registered symbols can't participate in WeakMaps or WeakSets, but I wonder how the memory is handled under the hood for those.
If you call Symbol.for('foo'), and then the resulting value is gc'ed, and then you call Symbol.for('foo') again, do you get back the "same" value, or is it just the "same" for "all" intents and purposes?
Run the code below with
node --expose-gc
. One might expect the output to bevalue
, but it actually printsundefined
.I think this should be documented under the “Limitations” section of the readme, because I don't see a way to fix this without causing memory leaks.
The text was updated successfully, but these errors were encountered: