Stay organized with collections
Save and categorize content based on your preferences.
Cleaner.Cleanable
public
static
interface
Cleaner.Cleanable
java.lang.ref.Cleaner.Cleanable
|
Cleanable
represents an object and a
cleaning action registered in a Cleaner
.
Summary
Public methods |
abstract
void
|
clean()
Unregisters the cleanable and invokes the cleaning action.
|
Public methods
clean
public abstract void clean ()
Unregisters the cleanable and invokes the cleaning action.
The cleanable's cleaning action is invoked at most once
regardless of the number of calls to clean
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Cleaner.Cleanable\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nCleaner.Cleanable\n=================\n\n\n`\npublic\nstatic\n\n\ninterface\nCleaner.Cleanable\n`\n\n\n`\n\n\n`\n\n|---------------------------------|\n| java.lang.ref.Cleaner.Cleanable |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n`Cleanable` represents an object and a\ncleaning action registered in a `Cleaner`.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[clean](/reference/java/lang/ref/Cleaner.Cleanable#clean())`() ` Unregisters the cleanable and invokes the cleaning action. |\n\nPublic methods\n--------------\n\n### clean\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void clean ()\n```\n\nUnregisters the cleanable and invokes the cleaning action.\nThe cleanable's cleaning action is invoked at most once\nregardless of the number of calls to `clean`.\n\n\u003cbr /\u003e"]]