Skip to content

Instantly share code, notes, and snippets.

@GaetanoPiazzolla
Created January 21, 2022 10:34
Show Gist options
  • Save GaetanoPiazzolla/2518e619ab9b21561eb540d7d7ca0f3d to your computer and use it in GitHub Desktop.
Save GaetanoPiazzolla/2518e619ab9b21561eb540d7d7ca0f3d to your computer and use it in GitHub Desktop.
public class Resurrected {
private static final Set<Resurrected> resurrected = new HashSet<>();
@Override
protected void finalize() throws Throwable {
resurrected.add(this); // Resurrect the object by creating a new reference
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment