Rename java API

Reviewed By: IanChilds

Differential Revision: D4265345

fbshipit-source-id: 69ecfd8fac214f86b8b70647b9b909acd83d78b5
This commit is contained in:
Emil Sjolander authored and Facebook Github Bot committed 2016-12-03 04:44:10 -08:00
1 parent 85ac5fc354
commit b9cedaefa6
16 files changed
+173 -154

No files matched your search

@@ -0,0 +1,28 @@
// Copyright 2004-present Facebook. All Rights Reserved.
package com.facebook.react.uimanager;
import com.facebook.csslayout.YogaNode;
import com.facebook.react.common.ClearableSynchronizedPool;
/**
* Static holder for a recycling pool of YogaNodes.
*/
public class YogaNodePool {
private static final Object sInitLock = new Object();
private static ClearableSynchronizedPool<YogaNode> sPool;
public static ClearableSynchronizedPool<YogaNode> get() {
if (sPool != null) {
return sPool;
}
synchronized (sInitLock) {
if (sPool == null) {
sPool = new ClearableSynchronizedPool<YogaNode>(1024);
}
return sPool;
}
}
}