Back to Fresco

DefaultCloseableReference

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

3.6.020.0 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Exceptions

Packages | Classes

Summary: Inherited Constants | Inherited Fields | Methods | Protected Methods | Inherited Methods | [Expand All]

public class

DefaultCloseableReference

extends CloseableReference<T>

| java.lang.Object | | ↳ | com.facebook.common.references.CloseableReference<T> | | | ↳ | com.facebook.common.references.DefaultCloseableReference<T> |

Summary

| [Expand] Inherited Constants | | --- | | From class com.facebook.common.references.CloseableReference

| int | REF_TYPE_DEFAULT | | | int | REF_TYPE_FINALIZER | | | int | REF_TYPE_NOOP | | | int | REF_TYPE_REF_COUNT | |

|

| [Expand] Inherited Fields | | --- | | From class com.facebook.common.references.CloseableReference

| protected boolean | mIsClosed | | | protected final CloseableReference.LeakHandler | mLeakHandler | | | protected final SharedReference<T> | mSharedReference | | | protected final Throwable | mStacktrace | |

|

Public Methods
CloseableReference<T>
Returns a new CloseableReference to the same underlying SharedReference.
Protected Methods
void

| [Expand] Inherited Methods | | --- | | From class com.facebook.common.references.CloseableReference

| abstract CloseableReference<T> | clone() Returns a new CloseableReference to the same underlying SharedReference. | | static <T> CloseableReference<T> | cloneOrNull(CloseableReference<T> ref) Returns the cloned reference if valid, null otherwise. | | static <T> List<CloseableReference<T>> | cloneOrNull(Collection<CloseableReference<T>> refs) Clones a collection of references and returns a list. | | synchronized CloseableReference<T> | cloneOrNull() | | void | close() Closes this CloseableReference. | | static void | closeSafely(Iterable<? extends CloseableReference<?>> references) Closes the references in the iterable handling null. | | static void | closeSafely(CloseableReference<?> ref) Closes the reference handling null. | | void | finalize() | | synchronized T | get() Returns the underlying Closeable if this reference is not closed yet. | | synchronized SharedReference<T> | getUnderlyingReferenceTestOnly() A test-only method to get the underlying references. | | int | getValueHash() Method used for tracking Closeables pointed by CloseableReference. | | synchronized boolean | isValid() Checks if this closable-reference is valid i.e. | | static boolean | isValid(CloseableReference<?> ref) Checks if the closable-reference is valid i.e. | | static <T extends Closeable> CloseableReference<T> | of(T t) Constructs a CloseableReference. | | static <T> CloseableReference<T> | of(T t, ResourceReleaser<T> resourceReleaser) Constructs a CloseableReference (wrapping a SharedReference) of T with provided ResourceReleaser. | | static <T> CloseableReference<T> | of(T t, ResourceReleaser<T> resourceReleaser, CloseableReference.LeakHandler leakHandler) | | static <T> CloseableReference<T> | of(T t, ResourceReleaser<T> resourceReleaser, CloseableReference.LeakHandler leakHandler, Throwable stacktrace) Constructs a CloseableReference (wrapping a SharedReference) of T with provided ResourceReleaser and a custom handler that's run if a leak is detected in the finalizer. | | static <T extends Closeable> CloseableReference<T> | of(T t, CloseableReference.LeakHandler leakHandler) Constructs a CloseableReference with a custom CloseableReference.LeakHandler that's run if a reference is not closed when the finalizer is called. | | static void | setDisableCloseableReferencesForBitmaps(int bitmapCloseableRefType) | | static boolean | useGc() |

| | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

| | From interface java.io.Closeable

| abstract void | close() |

| | From interface java.lang.AutoCloseable

| abstract void | close() |

|

Public Methods

public CloseableReference<T> clone()

Returns a new CloseableReference to the same underlying SharedReference. The SharedReference ref-count is incremented.

Protected Methods

protected void finalize()

Throws

| Throwable | |

+Generated by Doclava. +