DevNation 2014 – Jason Greene – JVM Finalize Pitfalls: How to Avoid the Danger

Abstract: Properly freeing external resources such as files and connections in a garbage collected environment requires care. The JVM’s finalize() and PhantomReference features provide APIs and JVM targetted languages a way to handle the common case of a forgotten close. Unfortunately these capabilities are deeply flawed, and require specialized techniques to use correctly. This session will dive deeply into the problem, showing how the JVM can get it wrong. It will offer useful tips on how developers can safely manage their resources, and never forgot to close. In addition, API and language designers will gain more insight into the inner-workings of the JVM, and how they can safely avoid the peril of JVM finalization.



via DevNation 2014 – Jason Greene – JVM Finalize Pitfalls: How to Avoid the Danger.

Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!


More about DevNation:  DevNation 2014 was our inaugural open source, polyglot conference for application developers and maintainers. View some of the DevNation 2015 session recordings here.  DevNation 2016 will be in San Francisco, USA, the week of June 26.  Be sure to follow its status and register at

Leave a Reply