DefTruth / lite.ai.toolkit

🛠 A lite C++ toolkit of awesome AI models, support ONNXRuntime, MNN. Contains YOLOv5, YOLOv6, YOLOX, YOLOv8, FaceDet, HeadSeg, HeadPose, Matting etc. Engine: ONNXRuntime, MNN.
https://github.com/DefTruth/lite.ai.toolkit
GNU General Public License v3.0
3.53k stars 672 forks source link

请教一个关于c++的问题 #375

Closed TitansWhale closed 3 months ago

TitansWhale commented 1 year ago

感谢作者分享,看了作者源码学到很多东西。 在ort_handler.cpp 代码的104行中 image onnx_path 指向了一个临时内存,在离开构造函数之后。_w_onnx_path会被释放掉。会导致onnx_path失效。(作为c++初学者,我想知道我的理解是否有错?)

DefTruth commented 1 year ago

这个不影响的,路径也之后在这个构造函数的作用作用域用到,initialize_handler()在这个构造函数的作用域内。

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale.