The example using the Cleaner in java.lang.ref.Cleaner class javadoc does not show a specific cleanup example. One suggestion is to use details from a specific use of Cleaner that replaces finalization.