Simplify memory model between managed and unmanaged memory

Differential Revision: D4051454

fbshipit-source-id: 8f5d010be520b3d1c981a7f85e5e6d95773ea6c1
This commit is contained in:
Emil Sjolander
2016-10-24 10:43:43 -07:00
committed by Facebook Github Bot
parent 6a774f0af1
commit 58b5e28e71
5 changed files with 26 additions and 91 deletions
@@ -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");
}