The MemoryManager is using a List which ultimately means that .equals is being used to compare values in methods such as persist. Instead, we should use an Array or some structure that uses == to compare values. This is because two Objects that are created, much be released independently, regardless if they are .equals() or not.
The
MemoryManageris using aListwhich ultimately means that.equalsis being used to compare values in methods such aspersist. Instead, we should use an Array or some structure that uses==to compare values. This is because two Objects that are created, much be released independently, regardless if they are.equals()or not.