0
Garbage Collection in Java
Hi, I have some questions concerning the Garbage collection in Java. When we use the finalize() method in our program, the JVM can ignore the request ? And how many times it can be called.
1 Resposta
+ 1
Finalize is a normal method, you can call it as often as you want.
The gc will call it once before it deletes the object, but running .finalize yourself does not trigger the gc to run.