Hazim Hazim - 1 year ago 64
Java Question

Java Finalize method call when close the application

I have question regarding the finalize method. If I have many classes with many inheritances, how can I call all finalize methods when the application closing?

Answer Source

System.runFinalizersOnExit(true), but note that it's deprecated. If you're relying on this sort of thing you're already doing something wrong basically.