From 95df6be9164396da9799b9526db4d3ca98f45915 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Tue, 20 Oct 2020 13:14:09 +0800 Subject: [PATCH] fix android demo --- .../baidu/paddle/lite/demo/ocr/OCRPredictorNative.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/OCRPredictorNative.java b/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/OCRPredictorNative.java index c3f319b5..3bb7e06d 100644 --- a/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/OCRPredictorNative.java +++ b/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/OCRPredictorNative.java @@ -35,12 +35,6 @@ public class OCRPredictorNative { } - public void release() { - if (nativePointer != 0) { - nativePointer = 0; -// destory(nativePointer); - } - } public ArrayList runImage(float[] inputData, int width, int height, int channels, Bitmap originalImage) { Log.i("OCRPredictorNative", "begin to run image " + inputData.length + " " + width + " " + height); @@ -63,7 +57,7 @@ public class OCRPredictorNative { protected native float[] forward(long pointer, float[] buf, float[] ddims, Bitmap originalImage); - protected native void release(long pointer); + public native void release(long pointer); private ArrayList postprocess(float[] raw) { ArrayList results = new ArrayList();