Package com.sun.jna.internal

# Class Cleaner

java.lang.Object
com.sun.jna.internal.Cleaner

public class Cleaner extends Object
Implement ReferenceQueue based cleanup of resources associated with GCed objects. It replaces the `Object#finalize` based resource deallocation that is deprecated for removal from the JDK.

This class is intented to be used only be JNA itself.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static interface`
`Cleaner.Cleanable`

## Method Summary

Modifier and Type
Method
Description
`static Cleaner`
`getCleaner()`
`Cleaner.Cleanable`
`register(Object obj, Runnable cleanupTask)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getCleaner

public static Cleaner getCleaner()

### register

public Cleaner.Cleanable register(Object obj, Runnable cleanupTask)