apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Possible memory leak in Prediction module?

Open ShepelIlya opened this issue 6 years ago • 2 comments

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?

ShepelIlya avatar Dec 07 '19 20:12 ShepelIlya

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.

kechxu avatar Dec 10 '19 01:12 kechxu

Ty @ivbelkin for pull request, now leak is gone.

ShepelIlya avatar Dec 11 '19 18:12 ShepelIlya