When is the memory of a (no longer used) ViewComponent released? #469
-
We started using ViewComponents in combination with Motion to render orders in our application. We now somehow have the feeling (by diving into it with get_process_mem and rack_mini_profiler) that the memory allocated by these components is not released when the page is closed, so that our Rails application keeps on growing for days, to eventually be thrown out by Heroku. Question: is this indeed the case? And if yes: what can we do to reclaim the memory used? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I would have thought that view component instances would be garbage collected like any other object. 🤔 @dannyvanhoof Is there any way you could share your findings, or even better, a minimal reproduction of the issue we can dive into? |
Beta Was this translation helpful? Give feedback.
-
It looks like this issue is related to the |
Beta Was this translation helpful? Give feedback.
It looks like this issue is related to the
motion
library, the solution is being tracked here: unabridged/motion#49