Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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