public interface


Known Indirect Subclasses

Class Overview

Interface that abstracts the action of releasing a resource.

There are multiple components that own resources that are shared by others, like pools and caches. This interface should be implemented by classes that want to perform some action when a particular resource is no longer needed.


Public Methods
abstract void release(T value)
Release the given value.

Public Methods

public abstract void release (T value)

Release the given value.

After calling this method, the caller is no longer responsible for managing lifetime of the value.

This method is not permitted to throw an exception and is always required to succeed. It is often called from contexts like catch blocks or finally blocks to cleanup resources. Throwing an exception could result in swallowing the original exception.