Instances of the components seem to be kept in the memory when containing ejs-richtexteditor.
Sample:
Video:
Reproduce steps:
- unzip the demo project, install, build and start:
- npm install or yarn install
- ng build or yarn build
- ng serve or yarn start
- open developer tools, go to the "Memory" tab, take a heap snapshot
- switch "Block 1" 10 times on and off by clicking on the "TOGGLE Block 1" Button, make sure that it's switched off at the end
- take another heap snapshot on the "Memory" tab in developer tools, choose "Comparison" in the toolbar and type in "rich" in the "Class filter" input
Result: you'll see 11 instances of "LComponentView_RichTextEditorComponent" - type "dummy" in the "Class filter" input
Result: you'll see 11 instances of "LComponentView_DummyComponent" and 10 instances of "DummyComponent" - now switch "Block 2" 10 times on and off by clicking on the "TOGGLE Block 1" Button, make sure that it's switched off at the end
- take another heap snapshot, choose "Comparison" in order to compare snapshot 3 with the preceeding snapshot 2, type "dummy" in the "Class filter" input
Result: you'll se no new instances of "DummyComponent"