If I call finalize()
on an object from my program code, will the JVM still run the method again when the garbage collector processes this object?
This would be an approximate example:
MyObject m = new MyObject();
m.finalize();
m = null;
System.gc()
Would the explicit call to finalize()
make the JVM's garbage collector not to run the finalize()
method on object m
?