File tree 1 file changed +15
-9
lines changed
perception/autoware_tensorrt_yolox/src
1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -341,16 +341,22 @@ TrtYoloX::TrtYoloX(
341
341
342
342
TrtYoloX::~TrtYoloX ()
343
343
{
344
- if (use_gpu_preprocess_) {
345
- if (image_buf_h_) {
346
- image_buf_h_.reset ();
347
- }
348
- if (image_buf_d_) {
349
- image_buf_d_.reset ();
350
- }
351
- if (argmax_buf_d_) {
352
- argmax_buf_d_.reset ();
344
+ try {
345
+ if (use_gpu_preprocess_) {
346
+ if (image_buf_h_) {
347
+ image_buf_h_.reset ();
348
+ }
349
+ if (image_buf_d_) {
350
+ image_buf_d_.reset ();
351
+ }
352
+ if (argmax_buf_d_) {
353
+ argmax_buf_d_.reset ();
354
+ }
353
355
}
356
+ } catch (const std::exception & e) {
357
+ std::cerr << " Exception in TrtYoloX destructor: " << e.what () << std::endl;
358
+ } catch (...) {
359
+ std::cerr << " Unknown exception in TrtYoloX destructor" << std::endl;
354
360
}
355
361
}
356
362
You can’t perform that action at this time.
0 commit comments