mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-24 21:33:16 +08:00
修复Paddle内存泄露的问题
This commit is contained in:
parent
fcc5f19237
commit
375ad67239
@ -58,7 +58,7 @@ public class OCRPredictorNative {
|
||||
}
|
||||
|
||||
public void destory(){
|
||||
if (nativePointer > 0) {
|
||||
if (nativePointer != 0) {
|
||||
release(nativePointer);
|
||||
nativePointer = 0;
|
||||
}
|
||||
@ -102,5 +102,9 @@ public class OCRPredictorNative {
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
destory();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user