1. Add two Dialog pages, one [EnableResize = true] and one [EnableResize = false], with other attributes the same (5MB data will be loaded in the page)

2. Before you start clicking, take a memory snapshot
3. Click the [Not Allow Resize Dialog] button 10 times, click [collect garbage], and take a memory snapshot again. At this time, it is found that the memory has increased by about 2MB-5MB. This is normal.
4. Click the [Allow Resize Dialog] button 10 times, click [collect garbage], and take a memory snapshot again. At this time, it is found that the memory has increased by about 50MB.
Example:https://stackblitz.com/edit/angular-9a6kdk?file=src%2Fdialog%2Fenableresizedialog%2Ferdialog.html,src%2Fdialog%2Fdisableresizedialog%2Fdrdialog.html,src%2Fdialog%2Fdialog.page.ts