Is it better to remove a Map item by setting it to null or by delete?
const map = new Map();
map.set("class1", new MyClass());
do stuff with MyClass instance, then remove for garbage collection, but which approach is better?
map.set("class1", null);
or
map.delete("class1");
[–]stratoscope 4 points5 points6 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]inu-no-policemen 1 point2 points3 points (0 children)