3 ms·
There are definitely mechanisms to do this in the JVM, such as the `finalize` method or in more recent versions, the `java.lang.ref.Cleaner` class. However, us
by lukev 4y ago
There are definitely mechanisms to do this in the JVM, such as the `finalize` method or in more recent versions, the `java.lang.ref.Cleaner` class.
However, using them correctly in the context of memory leakage and safety is non-intuitive and is definitely a bit tricky.