Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rachel_delany
Creator II

Memory leakage in QlikSense extension

I have developed a QlikSense extension to loop through sheets of an app based on timer settings.

The extension utilises the setTimeout() javascript method but I am having issues with memory leakage.

I have tried to find a way to clear the timeout using clearTimeout() method but with no success.

Has anyone used these methods within a QlikSense extension and can advise a way to prevent the memory leakage?

2 Replies
m_s
Partner - Creator II

Hello Rachel,

are you using angular to develop your extensions? If yes take a look AngularJS's wrapper for window.setTimeout: $timeout

Otherwise make sure you are clearing the same timeout you are creating, e.g (shamelesly copied from w3schools):

var myTimeout;


myTimeout = setTimeout(function(){ alert("Hello"); }, 3000);


clearTimeout(myTimeout);

Cheers,

Mathias

ErikWetterberg

Hi,

It can be pretty tricky to use an extension to loop through sheets since extensions live on sheets so changing sheet will destroy the extension, though it will probably still be loaded. Have you considered other approaches like a webpage with a sheet in an iframe and the loop in the main page?

Erik Wetterberg