mv_machine_learning: fix memory leak issue 04/279504/2
authorInki Dae <inki.dae@samsung.com>
Wed, 10 Aug 2022 09:21:11 +0000 (18:21 +0900)
committerInki Dae <inki.dae@samsung.com>
Wed, 10 Aug 2022 23:53:06 +0000 (08:53 +0900)
commit2f52a96298347cbb1ed52eed542ed0fbb0b64a49
tree5158619ff55bfefc121c5ef8c2ba64ca06cdf966
parenteeb6d7d16da4035305475398db72535268d00659
mv_machine_learning: fix memory leak issue

[Version] : 0.23.13
[Issue type] bug fix.

Fixed a memory leak issue with non-meta file inference by introducing
convertToFloat function of TensorBuffer class, which clears owner_is_backend
so that the buffer allocated with float type can be released properly.

And also this patch drops the code smell, code duplication, and
renames existing function name - setTensorBuffer to addTensorBuffer.

Change-Id: I062aa9cf05fc6ebb53e4cfd0c4ae6bb0d98d65fe
Signed-off-by: Inki Dae <inki.dae@samsung.com>
mv_machine_learning/inference/include/TensorBuffer.h
mv_machine_learning/inference/src/Inference.cpp
mv_machine_learning/inference/src/TensorBuffer.cpp
packaging/capi-media-vision.spec