mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Rename java API
Reviewed By: IanChilds Differential Revision: D4265345 fbshipit-source-id: 69ecfd8fac214f86b8b70647b9b909acd83d78b5
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user