Simplify memory model between managed and unmanaged memory
Summary: Instead of having different lifetimes for java and c memory we can can tie them together and make them much easier to manage. This also leads to automatically pooling native memory if pooling java memory. Differential Revision: D4051454 fbshipit-source-id: 8f5d010be520b3d1c981a7f85e5e6d95773ea6c1
This commit is contained in:
committed by
Facebook Github Bot
parent
4c57029a28
commit
69c374e74e
@@ -61,11 +61,6 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
private boolean mIsTextNode = false;
|
||||
private Object mData;
|
||||
|
||||
@Override
|
||||
public void reinit() {
|
||||
free();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getChildCount() {
|
||||
return mChildren == null ? 0 : mChildren.size();
|
||||
@@ -626,7 +621,7 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* recycling {@link CSSNodeDEPRECATED} instances.
|
||||
*/
|
||||
@Override
|
||||
public void free() {
|
||||
public void reset() {
|
||||
if (mParent != null || (mChildren != null && mChildren.size() > 0)) {
|
||||
throw new IllegalStateException("You should not free an attached CSSNodeDEPRECATED");
|
||||
}
|
||||
|
Reference in New Issue
Block a user