Automatically init native memory when allocating java wrapper
Reviewed By: lucasr Differential Revision: D3992802 fbshipit-source-id: 06d65821f1802ed8f2b2db651cef69f6851803f2
This commit is contained in:
parent
6dae68306e
commit
38bd937b40
|
@ -35,6 +35,10 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
|
|||
private long mNativePointer;
|
||||
private Object mData;
|
||||
|
||||
public CSSNode() {
|
||||
init();
|
||||
}
|
||||
|
||||
private void assertNativeInstance() {
|
||||
if (mNativePointer == 0) {
|
||||
throw new IllegalStateException("Null native pointer");
|
||||
|
|
Loading…
Reference in New Issue