[Coverity] Fix Coverity issue at neuralnet destructor
authorDonghak PARK <donghak.park@samsung.com>
Thu, 6 Feb 2025 01:26:10 +0000 (10:26 +0900)
committerjijoong.moon <jijoong.moon@samsung.com>
Fri, 7 Feb 2025 02:15:08 +0000 (11:15 +0900)
commit666b08d4549daf02b2d4ca9078130ef5a580420f
tree514dc63450b4aaacab35872a9ea9ea2304447142
parent097feb9913e522bc25e1c28fc1aa27fb5a7e7ad1
[Coverity] Fix Coverity issue at neuralnet destructor

Uncaught exception (UNCAUGHT_EXCEPT)

exn_spec_violation: An exception of type std::length_error is thrown but the exception specification /*implicit*/noexcept doesn't allow it to be thrown. This will result in a call to terminate().
- in general, throw exception at destrctor is not allowed
- so, add exception at deallocate Tensor

Resolves:

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghak PARK <donghak.park@samsung.com>
nntrainer/models/neuralnet.cpp