fix trtModelStream release

pull/108/head
xiaxy 1 year ago
parent d9687b12c1
commit 4f52dd501a
  1. 2
      csrc/detect/end2end/include/yolov8.hpp
  2. 2
      csrc/detect/normal/include/yolov8.hpp
  3. 2
      csrc/jetson/detect/include/yolov8.hpp
  4. 2
      csrc/jetson/pose/include/yolov8-pose.hpp
  5. 2
      csrc/jetson/segment/include/yolov8-seg.hpp
  6. 2
      csrc/pose/normal/include/yolov8-pose.hpp
  7. 2
      csrc/segment/normal/include/yolov8-seg.hpp
  8. 2
      csrc/segment/simple/include/yolov8-seg.hpp

@ -66,7 +66,7 @@ YOLOv8::YOLOv8(const std::string& engine_file_path)
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

@ -72,7 +72,7 @@ YOLOv8::YOLOv8(const std::string& engine_file_path)
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

@ -66,7 +66,7 @@ YOLOv8::YOLOv8(const std::string& engine_file_path)
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

@ -80,7 +80,7 @@ YOLOv8_pose::YOLOv8_pose(const std::string &engine_file_path) {
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

@ -76,7 +76,7 @@ YOLOv8_seg::YOLOv8_seg(const std::string& engine_file_path)
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

@ -80,7 +80,7 @@ YOLOv8_pose::YOLOv8_pose(const std::string &engine_file_path) {
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

@ -76,7 +76,7 @@ YOLOv8_seg::YOLOv8_seg(const std::string& engine_file_path)
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

@ -76,7 +76,7 @@ YOLOv8_seg::YOLOv8_seg(const std::string& engine_file_path)
this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size); this->engine = this->runtime->deserializeCudaEngine(trtModelStream, size);
assert(this->engine != nullptr); assert(this->engine != nullptr);
delete[] trtModelStream;
this->context = this->engine->createExecutionContext(); this->context = this->engine->createExecutionContext();
assert(this->context != nullptr); assert(this->context != nullptr);

Loading…
Cancel
Save