Unplanned
Last Updated: 27 Oct 2022 08:40 by Simon
Simon
Created on: 27 Oct 2022 08:40
Category: PDFViewer
Type: Bug Report
1
Memory Leak in Kendo PDFViewer when destroying the widget

Bug report

When the PDFViewer is created and a file is loaded using the fromFile method a new thread will be created. That thread remains in memory and doesn't get destroyed when the entire widget is destroyed.
$("#pdfViewer").data("kendoPDFViewer").destroy(); $("#pdfViewer").empty();

Reproduction of the problem

  1. Open the Dojo
  2. Open the 'Memory' tab in the Developer tools
  3. Click the 'Create' and then click the 'Destroy' button

Current behavior

That created thread remains in memory and doesn't get destroyed.

Expected/desired behavior

The thread should get destroyed when the widget is destroyed.

###Workaround
A possible workaround:
kendoPDFViewer.processor.pdf.loadingTask.destroy();

The issue should be additionally researched as there are some leftovers in the JS Heap even when the workaround is used.
image

Environment

  • Kendo UI version: 2022.3.913
  • Browser: [all ]
0 comments