Skip to content

Instantly share code, notes, and snippets.

View RogerRiggs's full-sized avatar

Roger Riggs RogerRiggs

View GitHub Profile
@RogerRiggs
RogerRiggs / SensitiveData.java
Last active February 19, 2023 00:15
Example Using java.lang.ref.Cleaner as a Replacement for Finalize and Testing of the cleanup.
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or