Skip to content
Advertisement

Chrome DevTools, Memory: what is `feedback_cell` and how to resolve memory leak that traces to it?

Testing memory leaks in Chrome DevTools (after several attach/detach the jQuery plugin) I have found that there are some delta objects but I can’t understand their nature:

What is feedback_cell about which reports DevTools? I do not have such identifier in my code (here BsMultiSelect.js).

enter image description here Line number points to method definition: function staticContentGenerator(...) { I guess the feedback_cell is something from internal js structures, but I can’t find anything about it.

How to deal with such traces?

Advertisement

Answer

Got the same question, but this article helped me to understand what is feedback_cell

https://rohitwhocodes.wordpress.com/2020/08/20/feedback-vectors-in-heap-snapshots/

TLDR;

  • feedback_cell is not a cause of memory leak
  • feedback_cell (also known as feedback vector) is array of metadata information maintained by v8 engine to optimize execution performance.

How do feedback vectors affect memory investigations?

They are a red herring and if you see a feedback_cell in the retainer list that you are investigating, you can safely assume this specific retainer list is not the cause of the leak.

You can think of feedback vectors are soft references and hence it is safe to ignore them as a cause of a memory leak.

Update: as Sebastian said in comments

  • If you think that you don’t have a memory leak, but you still see these feedback_cells, this means you do have a memory, however it is not caused by these references
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement