memory leak: the TaraXLPoseTracking object is not deleted
nvidiamfilimonov opened this issue · comments
Mikhail commented
The TaraXLPoseTracking object allocated at
is not deleted, thus it's memory is leaked.
I suggest using
std::unique_ptr
smart pointer and std::make_unique
function to avoid the leak.e-con Systems India Pvt Ltd. commented
Hi @nvidiamfilimonov ,
The mentioned suggestion is done in the latest commit. Please consider the changes.
Thank you.
Mikhail commented
Thank you, I suggest also explicitly deleting the TaraXLPoseTracking object by calling unique_ptr::reset
in TaraXLIMU::stop()
It's allocated at start and not needed after stop.
e-con Systems India Pvt Ltd. commented
Done in the commit here.
Mikhail commented
The code can be simplified to taraxlPoseTracking.reset();