@Srinithi wrote:
Hi… I have a simple ember app that does data-down to a component
I basically want to avoid memory leaks in my app. I tested in canary and found that there are detached HTMLDivElements… Below is the screenshot… Are these really memory leaks? If yes, Can someone please help me out on how to avoid these leaks? Also, is there anyway to find the source of the leaks from the heap snapshots?
Here is the twiddle
https://ember-twiddle.com/8e3cf314c7885ec42c06ed3fab236020?openFiles=templates.components.memory-leak-parent.hbs%2Ctemplates.components.memory-leak-child.hbs
I did the following:
- Took a heap snapshot after loading the twiddle (snapshot1)
- Clicked on Show/Hide child button to show the child component
- Clicked on Show/Hide child button to hide the child component
- Took a heap snapshot ( snapshot 2 ) Compared the snapshots and found the following
Posts: 1
Participants: 1