Why is the object instance stored in hash for easy release?

Why is the object instance stored in hash for easy release?
Environment language: JavaScript

Mar.31,2021

think about how to release it quickly. In fact, the essence is to be able to quickly locate the address of this instance in memory!
hash storage is to calculate a unique memory address according to the target characteristics according to certain rules, and store the target in this address.
the next time you delete, you only need to use the same algorithm to get the memory address according to the characteristics of the object, locate and release it.

Menu