docs/javadoc/reference/com/facebook/drawee/components/DeferredReleaser.html
|
|
Summary: Nested Classes | Ctors | Methods | Inherited Methods | [Expand All]
public abstract class
extends Object
| java.lang.Object | | ↳ | com.facebook.drawee.components.DeferredReleaser |
Component that defers release until after the main Looper has completed its current message. Although we would like for defer release to happen immediately after the current message is done, this is not guaranteed as there might be other messages after the current one, but before the deferred one, pending in the Looper's queue.
onDetach / onAttach events are used for releasing / acquiring resources. However, sometimes we get an onDetach event followed by an onAttach event within the same loop. In order to avoid overaggressive resource releasing / acquiring, we defer releasing. If onAttach happens within the same loop, we will simply cancel corresponding deferred release, avoiding an unnecessary resource release / acquire cycle. If onAttach doesn't happen before the deferred message gets executed, the resources will be released.
| Nested Classes |
|---|
| interface |
| Public Constructors |
|---|
| Public Methods |
|---|
| abstract void |
| Cancels a pending release for this object. |
| synchronized static DeferredReleaser |
| abstract void |
| Schedules deferred release. |
| [Expand] Inherited Methods | | --- | | 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() |
|
Cancels a pending release for this object.
| releasable | Object to cancel release of. |
Schedules deferred release.
The object will be released after the current Looper's loop, unless cancelDeferredRelease is called before then.
| releasable | Object to release. |
+Generated by Doclava. +