Back to Fresco

ResourceReleaser

docs/javadoc/reference/com/facebook/common/references/ResourceReleaser.html

3.6.014.4 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Exceptions

Packages | Classes

Summary: Methods | [Expand All]

public interface

ResourceReleaser

| com.facebook.common.references.ResourceReleaser<T> |

| Known Indirect Subclasses

AshmemMemoryChunkPool, BasePool<V>, BitmapPool, BucketsBitmapPool, BufferMemoryChunkPool, ByteArrayPool, DummyBitmapPool, DummyTrackingInUseBitmapPool, GenericByteArrayPool, LruBitmapPool, MemoryChunkPool, NativeMemoryChunkPool, Pool<V>, SimpleBitmapReleaser

| AshmemMemoryChunkPool | Manages a pool of ashmem memory chunks (AshmemMemoryChunk) | | BasePool<V> | A base pool class that manages a pool of values (of type V). | | BitmapPool | | | BucketsBitmapPool | Manages a pool of bitmaps. | | BufferMemoryChunkPool | Manages a pool of buffer memory chunks (BufferMemoryChunk) | | ByteArrayPool | A pool of byte-arrays | | DummyBitmapPool | | | DummyTrackingInUseBitmapPool | | | GenericByteArrayPool | A pool of byte arrays. | | LruBitmapPool | | | MemoryChunkPool | Manages a pool of memory chunks (MemoryChunk) | | NativeMemoryChunkPool | Manages a pool of native memory chunks (NativeMemoryChunk) | | Pool<V> | Manages a pool of reusable values of type V. | | SimpleBitmapReleaser | A releaser that just recycles (frees) bitmap memory immediately. |

|

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.

Summary

Public Methods
abstract void
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.

+Generated by Doclava. +