Remove unused YogaNodeJNIPhantomRefs.java

Summary:
Removed unused file YogaNodeJNIPhantomRefs.java as this was causing oss build failures because of an import.

````:yoga:compileDebugJavaWithJavac/home/travis/build/facebook/yoga/java/com/facebook/yoga/YogaNodeJNIPhantomRefs.java:9: error: package com.facebook.jni does not exist
import com.facebook.jni.DestructorThread;
                       ^
/home/travis/build/facebook/yoga/java/com/facebook/yoga/YogaNodeJNIPhantomRefs.java:30: error: package DestructorThread does not exist
    new DestructorThread.Destructor(node) {
                        ^
2 errors
 FAILED

Reviewed By: pasqualeanatriello

Differential Revision: D17257330

fbshipit-source-id: 98b0c5d5b7dcd94bee559b58194c13b07f47723d
This commit is contained in:
Sidharth Guglani
2019-09-11 10:24:38 -07:00
committed by Facebook Github Bot
parent 31de91bbac
commit a08a57b33c

View File

@@ -1,41 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
package com.facebook.yoga;
import com.facebook.jni.DestructorThread;
public class YogaNodeJNIPhantomRefs extends YogaNodeJNIBase {
public YogaNodeJNIPhantomRefs() {
super();
registerPhantomRef(this, mNativePointer);
}
public YogaNodeJNIPhantomRefs(YogaConfig config) {
super(config);
registerPhantomRef(this, mNativePointer);
}
@Override
public YogaNodeJNIPhantomRefs cloneWithoutChildren() {
YogaNodeJNIPhantomRefs clone = (YogaNodeJNIPhantomRefs) super.cloneWithoutChildren();
registerPhantomRef(clone, clone.mNativePointer);
return clone;
}
private static final void registerPhantomRef(YogaNode node, final long nativePointer) {
new DestructorThread.Destructor(node) {
private long mNativePointer = nativePointer;
@Override
protected void destruct() {
if (mNativePointer != 0) {
YogaNative.jni_YGNodeFree(mNativePointer);
mNativePointer = 0;
}
}
};
}
}