Describe the bug
Using the UploadDropZoneDirective in the Kendo FileSelect or Upload components causes a memory leak, as seen when repeatedly initializing and destroying the component such as in an ngIf.
Example with the directive, after showing and hiding the component 10 times
Click the "Click here" text repeatedly to show and hide the file select component.
Open DevTools (Chrome or Edge) and go to the memory tab.
Select the JavaScript VM instance that looks like the highlighted one here:
Take a heap snapshot.
In summary view, filter for "dropzone" or "component" to see that FileSelectComponents, UploadDropZoneDirectives and others are present multiple times, for each time you show and hide it.
Describe the bug Using the UploadDropZoneDirective in the Kendo FileSelect or Upload components causes a memory leak, as seen when repeatedly initializing and destroying the component such as in an ngIf.
Example with the directive, after showing and hiding the component 10 times
Example without the directive
To Reproduce Using this example: https://stackblitz.com/edit/angular-kg16zc-5gczvx?file=src%2Fapp%2Fapp.component.ts