Possible memory leak in Prediction module?
We are using apollo 5.0 (current commit 1e2c22cdd1a8ea6515afae1abe18360f8220e1f8) and it seems that there is a memory leak in Prediction module. If we use it for long time (f. e. 30 min) memory leak is about several Gb, and it's size depends on number of obstacles in perception data.
I tried to find some possible mistakes in code and there is no call for ObstaclesContainer::Clear() function in prediction_component if we don't use offline mode. Is it necessary to clear it?
Hi @ShepelIlya ,
Thanks for your message. ObstaclesContainer::Clear() function clears all obstacles stored inside. For online process, this function is not necessary because we use an LRU cache to store the obstacles, it automatically deletes the very old obstacles which have not been updated for a long time.
Ty @ivbelkin for pull request, now leak is gone.