提交 7dc9fd05 编写于 作者: X xiaohaichun

fix bug

上级 94ecd460
...@@ -24,7 +24,7 @@ public class ResultHolder: NSObject { ...@@ -24,7 +24,7 @@ public class ResultHolder: NSObject {
capacity = inCapacity capacity = inCapacity
} }
public func releasePointer() { @objc public func releasePointer() {
result?.deinitialize(count: capacity) result?.deinitialize(count: capacity)
result?.deallocate() result?.deallocate()
} }
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
[resultArray addObject:[NSNumber numberWithFloat:result.result[i]]]; [resultArray addObject:[NSNumber numberWithFloat:result.result[i]]];
} }
completion(success, resultArray); completion(success, resultArray);
[result releasePointer];
}]; }];
// [runner predictWithTexture:texture completion:completion]; // [runner predictWithTexture:texture completion:completion];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册