public class ComponentsPools extends Object
FUTURE: Consider customizing the pool implementation such that we can match buffer sizes. Without this we will tend to expand all buffers to the largest size needed.
Modifier and Type | Method and Description |
---|---|
static <E> ArrayDeque<E> |
acquireArrayDeque() |
static <E> ArraySet<E> |
acquireArraySet() |
static BorderColorDrawable |
acquireBorderColorDrawable() |
static <T> Diff |
acquireDiff(T previous,
T next) |
static com.facebook.litho.DisplayListDrawable |
acquireDisplayListDrawable(Drawable content,
com.facebook.litho.DisplayListContainer displayListContainer) |
static ArrayList<LithoView> |
acquireLithoViewArrayList() |
static RenderState |
acquireRenderState() |
static void |
clearInternalUtilPools()
Clear pools for all the internal util objects, excluding mount content.
|
static void |
clearMountContentPools()
Call from tests to clear external references.
|
static void |
maybePreallocateContent(ComponentContext context,
ComponentLifecycle lifecycle)
Pre-allocates mount content for this component type within the pool for this context unless the
pre-allocation limit has been hit in which case we do nothing.
|
static void |
release(Diff diff) |
public static <T> Diff acquireDiff(T previous, T next)
public static void release(Diff diff)
public static void maybePreallocateContent(ComponentContext context, ComponentLifecycle lifecycle)
public static void clearMountContentPools()
public static void clearInternalUtilPools()
public static com.facebook.litho.DisplayListDrawable acquireDisplayListDrawable(Drawable content, com.facebook.litho.DisplayListContainer displayListContainer)
public static BorderColorDrawable acquireBorderColorDrawable()
public static <E> ArraySet<E> acquireArraySet()
public static <E> ArrayDeque<E> acquireArrayDeque()
public static RenderState acquireRenderState()