10 ms·
In Java if you hold an reference to an "old" object then that will be kept alive until all references are exhausted, thus an identity comparison comparing point
by whizzter 2y ago
In Java if you hold an reference to an "old" object then that will be kept alive until all references are exhausted, thus an identity comparison comparing pointers will never succeed as long as someone holds an reference (that is compared to).
In languages with more manual management, the pointer itself if used can be reused and succeed in bad cases (though from my cursory knowledge of Rust this seems to indicate quite a bit of unsafe behaviours).